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.
In While loop the condition is tested first and then the statements are executed if the condition turns out to be true. In do while the statements are executed for the first time and then the conditions are tested, if the condition turns out to be true then the statements are executed again. am trying to get a head start because i really have a passion for computers, and i want to do software engineering at uni. Anyways, as I so far understood, the difference between a while and a do loop is that before the loop is started, (in the while loop) the int that we are testing is already initialized.