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.
When the while loop is encountered by the computer, the behaviour is as follows: 1  If the expression is false, then skip the code inside the brackets { } and continue with the program. 2  Otherwise, execute the code in the brackets { } and goto step 1 again.