3.5. while Loops

The for loop takes a collection of items and executes a block of code once for each item in the collection. In contrast, the while loop runs while a certain condition is true.