Promotic
WikipediaLinkedInYoutubeTwitterFacebook

while - statement of language JavaScript

Description:
Repeats a block of statements while the condition is true..
Syntax:
while (condition)
{
  [statements]
}
 
condition An expression evaluated before each pass through the loop.
If condition evaluates to true, then the statements in loop are executed.
If condition evaluates to false, then execution continues with the statement after the loop.
statements A statements that are executed repeatedly as long as 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;
while (i <= 6)
{
Pm.Debug("Boiler " + i);
i++;
}

History:
Pm8.02.00: Created
PROMOTIC 9.0.13 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice