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.
The do ... while loop ensures that the body of the loop executes at least once. I wrote a lengthy response to a question regarding the differences between while loops and for loops (Is there a reason to use a while loop instead of a for loop? -- which expands a bit on Mr. Hasan's answer above).