I try to create multiple arrays in a loop. I was told that the correct way to do this is by creating 2-dimentional arrays. So I made the following code, but it keep telling me eleArray[0] is undefined. anyone? Thanks
var eleArray = [];
for(var i=0;i<rssArray;i++)
{
eleArray[i] = [];
}
eleArray[0][0] = "tester";
alert(eleArray[0][0]);
Assuming that
rssArrayis an array as the name implies, you need to loop based on the length: