eequalsmc2plus1
Programmer
Hey,
Anyone know how to use a variable if its name is stored in another variable ?
eg:
var A="";
var B="";
var C="";
var X = new array(3);
X[1] = "A";
X[2] = "B";
X[3] = "C";
So now JUST using the variable X, I want to set the values of A B and C.
in other language i know you can say @X[1] = "whatever" and it will make A="whatever" but how u do it in JavaScript ?
Thanks
Damian
Anyone know how to use a variable if its name is stored in another variable ?
eg:
var A="";
var B="";
var C="";
var X = new array(3);
X[1] = "A";
X[2] = "B";
X[3] = "C";
So now JUST using the variable X, I want to set the values of A B and C.
in other language i know you can say @X[1] = "whatever" and it will make A="whatever" but how u do it in JavaScript ?
Thanks
Damian