Statements: Do While
The do while
statement is used to execute a block of code while a condition is true.
syntax
DoWhileStatement :
do
BlockStatement
while
Expression
;
do {
// ...
} while $condition;
Unlike the while
statement, the do while
statement will always execute at least once.
do {
// ...
} while false;