Die continue-Anweisung JAVAScript-Beispiel

/////////////////////////////////////////
// function continue_()
/////////////////////////////////////////
function continue_()
  { //1
    x=0;
    while (x<3)
    { //2
      if (++x < 3)
      {//3
        alert("x ist kleiner 3, x ist:" + x);
        continue;
      }//3

//  an diese Stelle gelangt man nur, wenn x gleich/grösser 3
// "kleiner" und nicht "kleiner-gleich" abgefragt wird
     alert("x ist " + x);
     } //2 while
}  //1
/////////////////////////////////////////
// function ohne_continue_()
/////////////////////////////////////////
function ohne_continue_()
  { //1
    x=0;
    while (x<3)
    { //2
      if (++x < 3)
      {//3
        alert("x ist kleiner 3, x ist:" + x);
      }//3
     alert("x ist " + x);
     } //2 while
}  //1