Instantiate a variable whose name is the value of another
Posted: Wed Aug 02, 2006 4:01 pm
Can u create a variable whose name is the value of another in JS?
e.g.
P.S. what is the tag used to highlight this as a javascript code?
Kendall
e.g.
Code: Select all
var variable1 = "myName";
// create the var named myName;
eval(variable) = 2 //...?Kendall