give me a loop for a 2d array in javascript

index.tsx
const array2D = [
  [1, 2, 3],
  [4, 5, 6],
  [7, 8, 9]
];

for (let i = 0; i < array2D.length; i++) {
  for (let j = 0; j < array2D[i].length; j++) {
    console.log(array2D[i][j]);
  }
}
189 chars
12 lines

related categories

gistlibby LogSnag