Do While
Do...While Statement Loops
The do...while
statement loop repeats until a specified condition comes back as FALSE.
The statement (i.e. i+= 1;
) executes once before the condition is checked; to execute multiple statements, use a block statement (i.e. {...}
) to group the statements together.
If the condition (i.e. i < 5
) is TRUE, the statement will loop again.
At the end of every execution, the condition is checked. When the condition is FALSE, the loop stops and control passes.
Last updated