js array two dimensional

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
//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: