The while loop is used when you want the loop to execute and continue executing while the specified condition is true. It tests the condition at the beginning of the loop, itself if the condition is true it executes the statements within the body of the loop or else it terminates. <html> <body> <script type
more..
The do..while statement tests the condition after the loop body executes, therefore the loop body always executes at least once. During testing, if the condition is true it repeats the statement for the specified number of times or it terminates the loop execution. Syntax: Do Statement; While(condition); Sample Programe: <html> <body> <script type =”text/javascript>
more..