Please enable JavaScript to use CodeHS

Chapter 6

Arrays

6.3 Enhanced for Loop for Arrays

Enhanced for Loops

Enhanced For Loop Applications

Enhanced For Loop

Classroom Array

Updating Values in a Loop

Check Your Understanding

  1. Invalid Answer

Exercise: Print Evens

Vocabulary

Term Definition
Enhanced For Loop A loop that is an alternate to a for or while loop that accesses each value in an array starting at the first value and proceeding in order.
Enhanced For Loop Variable Variable created in the enhanced for loop header that contains a copy of the array variable.