Loops let you run a block of code a certain number of times.


Note that in
Example 8.15, “Loops” we use the keyword var before the variable name i. This "scopes" the variable i to the loop block. We'll discuss scope in depth later in this chapter.