Please enable JavaScript to use CodeHS

Chapter 6

Arrays

6.2 Traversing Arrays

Accessing the Array

Determining Array Size

Iterating over an Array

Iterating Over An Array - For Loop

Iterating Over An Array - While Loop

Array Out of Bounds

Finding a Target Value

Check Your Understanding

  1. Incorrect Correct No Answer was selected Invalid Answer

Exercise: Print Even Array Indices

Vocabulary

Term Definition
Traversing an Array Traversing an array is the process to loop through an array and access each of the elements. Caution must be taken to avoid looping beyond the valid index values.