Learn Create Your Own Split Screen

Next Page

The program keeps doing the while loop until the test condition is no longer true, and only then does it get started on the statements that are listed after the end of the while.
In this example, notice how there's 20 unfilled rectangles, but only one filled rectangle.

That's because the fillRect is outside the while loop, but the strokeRect occurs inside the loop.