how can i create a multidimensional array having 78 rows and 12 coloumns | Sololearn: Learn to code for FREE!

+3

how can i create a multidimensional array having 78 rows and 12 coloumns

its a JavaScript project

11/1/2017 2:22:37 AM

sumit kumar dash

1 Answer

New Answer

+7

This creates a multidimensional integer array and initializes all elements within the sub arrays to 0. var multiDimArray = new Array(); for (var i = 0; i < 78; i++) { multiDimArray[i] = new Array(); for (var j = 0; j < 12; j++) { multiDimArray[i][j] = 0; } }