creating an array from array of arrays javascript code example
Example 1: js convert array of arrays to array
// Converts array with multiple values into a single array with all items:
var merged = [].concat.apply([], arrays);
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;
}
}