let arr = Array(3).fill(Array(3).fill(0)) arr[1][2] = 1 console.log(arr) /* => [0, 0, 1] [0, 0, 1] [0, 0, 1] */.
確定! 回上一頁