Web Designer? Design and market your own professional website with easy-to-use tools.
The switch statement is used to select one many blocks of code to be executed.
The while loop is used to execute a statement and to continue executing the statement while the specified condition is true.
Learn how to break out of an infinite loop with the use of the "break" keyword.
Learn how to use the "continue" keyword to break the current loop and continue with the next value.
Learn how to use the for...in statement to loop (iterate) through the elements of an array or through the properties of an object.