Mega Code Archive

 
Categories / JavaScript Tutorial / Statement
 

Use integer variable to control the while loop

< html> <head> <title>A Simple Page</title> <script language="JavaScript"> <!-- var x = 1 while (x < 10) {     ++x;     alert(x); } //  --> </script> </head> <body> </body> </html>