Javascript examples for Array Operation:Array Nest
Create nested array by assign array to another array
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=function(){/*from w w w .ja v a 2s. c om*/ var myListofArrays =[] var firstArray = [1,2,3,4,5,6]; var secondArray = [6,5,4,3,2,1]; var thirdArray = [1,1,1]; myListofArrays[0] =firstArray; myListofArrays[1]=secondArray; myListofArrays[2]=thirdArray; console.log(myListofArrays); } </script> </head> <body> </body> </html>