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 While Loop â Decision at the Beginning. The execution of a while loop is similar to the execution of a simple if statement. A condition is. checked on the first line (true or false). If the condition is true, we enter the loop and execute any. commands found within the body of the loop. If the condition is false, we exit the loop without. executing any commands.