Microsoft® JScript™
do...while Statement
 Language Reference 
Version 3 

See Also


Description
Executes a statement block once, and then repeats execution of the loop until a condition expression evaluates to false.
Syntax
do
   statement
while (expression) ;

The do...while statement syntax has these parts:

Part Description
statement The statement to be executed if expression is true. Can be a compound statement.
expression An expression that can be coerced to Boolean true or false. If expression is true, the loop is executed again. If expression is false, the loop is terminated.

Remarks
The value of expression is not checked until after the first iteration of the loop, guaranteeing that the the loop is executed at least once. Thereafter, it is checked after each succeeding iteration of the loop.

© 1997 by Microsoft Corporation. All rights reserved.