Menu
I am setting some javascript variable names to name1, name2, name3, etc.
I would like to concatenate “name” with a number in a separate javascript function, and get the value of the javascript variable.
An example would be :
var name1 = “one”;
var name2 = “two”;
var name3 = “andSoOn”;
function myfunction(theNumber)
{
var getthatvariable = “name” + theNumber;
alert(“this is the name for that number ” + getthatVariable);
}
I have not been able to get this to work.
Can you ??
(thank you for input as always.)
}