I know that javascript does not allow true multidimensional arrays, but you can sort "bodge" together by having arrays inside arrays.
I have 2 questions:
1) Will the conversion of 10 arrays into one multidimensional array, which has 10 arrays in it, improve, damage or not affect the performance of the web page?
2) I hope to create an array containing 100 elements, each of which will be an array of two elements, and finally, each of them will be an array of indefinite length.
I have the following code to create this "multidimensional" array:
var RouteArray = new Array(100);
for (var i=0; i <100; i++)
{
RouteArray[i]=new Array(2);
for (var j=0; j <2; j++)
{
RouteArray[i][j] = new Array();
}
}
Is this code reasonable? or would you experienced coders offer a better method?
, , , :
RouteArray[88][0].push(ValueToPush);
, , , ?
Var ValueAdded = RouteArray[88][0][0];
, , , , , , , .