When using the code below, an empty array containing 7 empty arrays is expected to be created, essentially forming a 7x7 grid.
While accessing elements within nested arrays seems to work correctly, attempting to modify their values causes all elements in the same column to change (i.e., adjusting [1][1] also affects [0][1], [2][1], and so on). The reason for this behavior remains unclear to me.
var usage = new Array(7).fill(new Array(7).fill(0));
usage[1][1] += 1;