javascript define multidimensional array

JavaScript
// declaration of a two-dimensional array
// 5 is the number of rows and 4 is the number of columns.
const matrix = new Array(5).fill(0).map(() => new Array(4).fill(0));

console.log(matrix[0][0]); // 0
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 of two dimensional array
var grid = [
  ["a", "b"],
  ["c", "d"],
  ["e", "f"]
];
console.log(grid[0][0]); // a
console.log(grid[1][1]); // d
console.log(grid);
Source

Also in JavaScript: