use while loop to iterate over 2d array + python code example
Example: how to use loop in 2d array
for (int row = 0; row < board.length; row++) {
for (int col = 0; col < board[row].length; col++) {
board[row][col] = row * col;
}
}