Please enable JavaScript to use CodeHS


CodeHS Lessons

Nested iteration statements are used to traverse and access all elements in a 2D array. Since 2D arrays are stored as arrays of arrays, the way 2D arrays are traversed using for loops and enhanced for loops is similar to 1D array objects.

15.2 Traversing 2D Arrays
8.2 Traversing 2D Arrays
7.9 2D Arrays (Matrices or Grids)
5.9 2D Arrays (Matrices or Grids)