Promotic

do...while - statement of language JavaScript

Description:
Repeats a block of statements while the condition is true.
Syntax:
do
{
  statements
}
while (condition)


condition An expression evaluated after each pass through the loop.
If condition evaluates to true, then the statements in loop are re-executed.
If condition evaluates to false, then control passes to the statement following the loop.
statements A statements that executed at least once and is re-executed each time the condition evaluates to true.
Note:
break statement can be used inside a loop to provide an alternate way to exit.

For similar purpose in the VBScript language is used the statement Do...Loop.
See also:
Example:
Statements in cycle 1 - 6
JavaScriptSelect and copy to clipboard

var i = 1;
do
{
Pm.Debug("Boiler " + i);
i++;
} while (i <= 5);
PROMOTIC 9.0.27 SCADA system documentation MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r.o.