The while Statement
<HTML> <HEAD> <TITLE>Using the While Statement</TITLE> </HEAD> <BODY> <SCRIPT><!-- i=1 while(i<7){ document.write("<H"+i+">This is a level "+i+" heading." +"</H"+i+">") ++i } // --></SCRIPT> </BODY> </HTML>