Javascript multi-dimensional array


I am trying to enable client to edit source of JS and define multi-dimensional array in this format:

imageArray[0][0][0][0] = 'image000.jpg';
imageArray[0][0][0][1] = 'image0001.jpg';
imageArray[1][0][0][0] = 'image1000.jpg';
imageArray[1][0][0][1] = 'image1001.jpg';

I made some dynamic "matrix" so JS do not output errors because of un-initialized array and now client can define arrays.

But problem is when I try to print some image, for some arrays (sub-arrays) there is problem.

Please check this attached document:

and you will see that it prints wrong image in alert()

Do you have idea what's problem ?

Thanks a lot in advance.
Sign In or Register to comment.