I have the sample code below;
var myarray= [],
myarray2=[];
var L=100;
for(j =0; j< 4;j++){
for(i =0; i<4;i++){
myarray.push([L]);
L=L+100;
}
myarray2.push(myarray);
alert(myarray2[j]);
}
The output will be
100,200,300,400,500,600,700,800,900,100,1100,1200,1300,1400,1500,1600
Is it possible to sort the values like below in an array within an array?
100, 500, 900, 1300
200, 600, 1000, 1400
300, 700, 1100, 1500
400, 800, 1200, 1600
I would appreciate any help....thanks in advance.
myarray2really supposed to contain 4 references to the samemyarray?