lazyRascal
Programmer
I'm trying to create a three dimension array in javascript. I know since javascript doesn't support multi-dimensional arrays, as such, that to accomplish equavalent results you must create arrays of arrays.
I thought the following code would work.
var matrix = new Array(4)
for (i=0; i <10; i++)
var matrix=new Array(10)
for (i=0; i<2; i++)
var matrix=new Array(3)
I'm want to create an array whose last value could be referenced by matrix[2][9][3].
Any guidence is appreciated.
Thanks
I thought the following code would work.
var matrix = new Array(4)
for (i=0; i <10; i++)
var matrix=new Array(10)
for (i=0; i<2; i++)
var matrix=new Array(3)
I'm want to create an array whose last value could be referenced by matrix[2][9][3].
Any guidence is appreciated.
Thanks