I have created a two-dimensional array and attempted to fill it using a nested loop. However, only the first dimension is being populated with the correct values while the other dimensions remain filled with null or undefined. Any suggestions on how to rectify this issue would be greatly appreciated.
var Arr = [];
var i = 0;
for (i = 0; i < 13; i++) {
Arr[i] = [];
}
var a = 0, b = 0;
for (a = 0; a < 13; a++) {
for (b = 0; b < 13; b++) {
Arr[[a][b]] = AnotherArrWithRightValues[(13 * a) + b];
}
}