📜  js 数组二维 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:21.738000             🧑  作者: Mango

代码示例1
// 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