Find great deals on eBay for Woodstock Ticket in Music Memorabilia. Shop with confidence.
Instead of adding several almost equal lines in a script we can use loops to perform a task like this. In JavaScript there are two different kind of loops: for - loops through a block of code a specified number of times. while - loops through a block of code while a specified condition is true.
Because the test of the while expression takes place before each execution of the loop, a while loop executes zero or more times. This differs from the do loop, which executes one or more times. A while loop can be terminated when a break, goto, return, or throw statement transfers control outside the loop.To pass control to the next iteration without exiting the loop, use the continue statement.ecause the test of the while expression takes place before each execution of the loop, a while loop executes zero or more times. This differs from the do loop, which executes one or more times. A while loop can be terminated when a break, goto, return, or throw statement transfers control outside the loop.