Syntax:
while ( boolean-expression ) body-statement

In the above syntax description, the single body-statement may be replaced with multiple statements by enclosing those statements in a statement block using braces:

{ statement1; statement2; statement3; }

Description:
The while statement repeatedly executes the body-statement as long as the boolean-expression evaluates to true, up to a maximum of 10,000 executions. If the boolean-expression evaluates to false or null, looping stops and the formula continues by executing any statements after the do statement. Note that the body-statement may never be executed if the boolean-expression does not evaluate to true the first time it is evaluated. If the boolean-expression is omitted, then it is considered to be true every time.