Menu
Hi,
I have several arrays with the same prefix, but suffixed with numbers.
I want to be able to step through these arrays in a for loop.
When I use the code below, ‘a’ + i, just evalutes to a string.
How do I get it to reference the array?
Thanks,
Robert
var a1 = [11];
var a2 = [22];
var a3 = [33];
var a4 = [44];
var a5 = [55];
for (var i = 1; i <=5; i++) {
alert( ‘a’ + i );
}