JavaScript 二维数组 创建 并且设定默认值

144 阅读1分钟
创建 m×n 的数组
const m = 3, n =5;
const list = new Array(3).fill([]).map(() => new Array(3).fill(false));
console.log(list);