Execute block of code. After that check if condition is still true, if still true, DO AGAIN.
The Do-While-Loop is, like the name shows, related to the While-Loop. Difference:
- WHILE – you check condition if true run code
- DO-WHILE – you first run and then check the condition
For Example:
Output:
infinitive do while loop
infinitive do while loop
infinitive do while loop
(followed by Ctrl-Z (Windows) or Ctrl-D (Linux and OSX).)