JavaScript Lessson 10

JavaScript While loop statement

Lesson 9


While loop statement:

  • The while loop loops through a block of code as long as a specified condition is true.

break statement:

  • The break statement exits a switch statement or a loop.

continue statement:

  • The continue statement breaks one iteration in the loop.