maclenin
February 17th, 2016, 06:25 PM
Is there a way to access the value of a javascript array using variables?
var a;
var b;
var ab = [1, 2, 3];
var c = a + b;
alert(c);
alert(c); yields NaN and not 1, 2, 3!
Is there a way to combine a and b to create a valid reference to the array ab?
Thanks for any guidance!
var a;
var b;
var ab = [1, 2, 3];
var c = a + b;
alert(c);
alert(c); yields NaN and not 1, 2, 3!
Is there a way to combine a and b to create a valid reference to the array ab?
Thanks for any guidance!