I am trying to call a string variable to reference an array variable.
message1[0][0] = "Hello."; // existing array
var caller = ['message1', 'message2', 'message3'];
alert(message1[0][0]);
But instead of using the message1 array in the alert, I want to use caller[0] (which is equal to "message1") so that it displays "Hello". How do you do this? This doesn't seem to work:
alert(caller[0][0][0]);
message1[caller[0]], but you really want an plain Object I think.