Promotic
WikipediaLinkedInYoutubeTwitterFacebook

do...while - statement of language JavaScript

Description:
Repeats a block of commands while the condition is true..
Syntax:
do (condition)
{
  [statements]
}
 
also the following syntax can be used, where the condition is at the end:
do
{
  [statements]
}
while (condition)
 
condition Numeric or string expression that is true or false.
statements One or more commands that are repeated while the condition is true or until the condition is not true.
Note:
For similar purpose in the VBScript language is used the command Do...Loop.
See also:
Example1:
Commands in cycle 1 - 6
var i=1, sBoil;
do (i<=6)
{
  sBoil = "Boiler "+i;
  i++;
}
Example2:
or
var i=1, sBoil;
do
{
  sBoil = "Boiler "+i;
  i++;
}
while (i<=6)
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice