Command |
Description |
Example of use |
This is a while loop that will repeat the code inside of it while a condition is met. The condition can be anything you want. In the example, the while loop will repeat while the age is less than 18. Every time the user enters an age if they enter a number less than 18 it will ask them again. When they enter an age over 18 it will then display the print command that comes after the loop.
|