Below you will find pages that mention the tag “javascript”
I’ve created a two dimensional array with const foo = Array(n).fill(Array(n).fill(0)); and when updating foo[1][1] = 2 it changed all cell in column 1.
Why JS, why?!!!.
⤑ Javascript multidimensional array updating specific element.