create array of arrays javascript code example
Example 1: how to make an array in javascript
var names = ["Sanjith", "Pranav", "Aadya", "Saharsh"]
Example 2: javascript define multidimensional array
var iMax = 20;
var jMax = 10;
var f = new Array();
for (i=0;i<iMax;i++) {
f[i]=new Array();
for (j=0;j<jMax;j++) {
f[i][j]=0;
}
}
Example 3: how i create array in javascript
var fruits = ['Apple', 'Banana'];
console.log(fruits.length);
// 2