N
activities.forEach((activity) => {
activity.forEach((data) => {
console.log(data);
});
});
N
The Array. of() method creates a new Array instance from a variable number of
arguments, regardless of number or type of the arguments. The difference between
Array. of() and the Array constructor is in the handling of integer arguments: Array.
N
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;
}
}
N
var [r, c] = [5, 5];
var m = Array(r).fill().map(()=>Array(c).fill(0));
N
String[][] arrays = new String[][] { array1, array2, array3, array4, array5 };
N
//2D array
let activities = [
['Work', 9],
['Eat', 1],
['Commute', 2],
['Play Game', 1],
['Sleep', 7]
];