7.12. 👩‍💻 Keeping Track of Your Iterator Variable and Your Iterable

When students first begin using for loops, they sometimes have difficulty understanding the difference between the iterator variable (the loop variable) and the iterable.

The iterable is the object that you will parsing through in a for loop. Generally, this object does not change while the for loop is being executed.

The iterator (loop) variable is the variable which stores a portion of the iterable when the for loop is being executed. Each time the loop iterates, the value of the iterator variable will change to a different portion of the iterable.

As you go through the codelens window, you will be asked a set of questions.

Activity: CodeLens 7.12.9 (clensQuestion6_100_10)

Activity: CodeLens 7.12.10 (clensQuestion6_100_11)

You have attempted of activities on this page