A while loop allows you to repeat a block of code as long as a condition is true.
It is very similar to an if statement, except instead of running the code block once, it runs it over and over again until the condition becomes false.
Run the code sample to see a while loop in action.
No variables
Output (Console)