Hi I am trying to add some values to a multidimensional array using a for loop. This is what I have created so far:
var test1 = [];
var test2 = [];
for (var i = 0; i < top10.length; i++)
{
test1[i] = i;
test1[i][0] = top10[i][0];
test1[i][1] = top10[i][1];
}
This is just returning an empty array. top10 is a multidimensional array which contains:
It can contain more data that's why I need a for loop. I am trying to create 2 multidimensional arrays "test1" and "test2" one will contain "Hinckley Train Station" and "4754" the other will contain "Hinckley Train Station" and "2274".
I can have multiple venues not just "Hinckley Train Station" "4754" "2274" I could also have "London City" "5000" "1000". This is why it is a for loop.