I created an array using Array and fill however after that I cannot edit a single value of this.
const board = new Array(4).fill(Array(4).fill(0))
board[0][0] = 1
This changes first index of every nested array.
[1, 0, 0, 0]
[1, 0, 0, 0]
[1, 0, 0, 0]
[1, 0, 0, 0]
So it isn't correct to create multidimensional array this way?