Iteration: Aliasing and Scoping

Learn about the aliasing and scoping of the iterator variable.

Iteration and aliasing

The for loop aliases the iterator variable to the values in the iteration, such that any modifications to the value of the iterator modify the value in place:

Get hands-on with 1200+ tech skills courses.