Promotic
WikipediaLinkedInYoutubeTwitterFacebook

break - statement of language JavaScript

Description:
Exits a block of for and switch.
Syntax:

break

Note:

For for cycle statement: It is located inside the cycle. The break statement terminates the cycle for (the code execution is moved to behind the for cycle).

For switch statement: It is located inside the statement. The break statement jumps out of the switch command (the code execution moves behind the switch statement).

 
For similar purpose in the VBScript language is used the statement Exit.
See also:
exit for statement:
for (var i=0; i<5; i++)
{
  if (i == 3)
    break;
  Pm.Debug("i=" + i);
}
exit switch statement:
var nNum = 17;
switch (nNum)
{
case 15: Pm.Debug("case=15"); break;
case 17: Pm.Debug("case=17"); break;
dafault:
  Pm.Debug("switch default=" + nNum);
  break;
}
PROMOTIC 8.3.19 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