Do-While Loop
Do-while-loops are loops with a similar behaviour to while-loops, with the main difference being that do-while loops run the statement once before starting evaluating its condition. Afterwards the statement is only run if the specified condition is met.
Syntax
Execution Schema
- Run
STATEMENT
(Only the first time). -
Check
CONDITION
, if it exists, before running theSTATEMENT
again. IfCONDITION
isfalse
, then the loop will be stopped! - Run
STATEMENT
ifCONDITION
wastrue
.