var game_board = [
[1, 2, 3],
[4, 5, 6],
[7, 8, 9],
];
(function iterate() {
game_board.forEach((row, i) => {
row.forEach((value, j) => {
// accessing indexes i and j
console.log(i, j);
});
});
})()
I have a two-dimensional array and I need to access the indexes of each element in it.