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.
Infinite Loops A loop is called an infinite loop. Important while loop rules: while loop is the generic loop; every loop can be written as a while loop. The for loop A for loop is a counting loop. for (initializer; loop entry condition; updater) { do these statements } for (int. Another well-known example :