Source of the above display is here

<script language='JavaScript' type='text/JavaScript'>
<!--
var i=0;
while (i <= 5)
   {
document.write(i+"<br>")
   i++;
   }
-->
</script>
Return to tutorial on While loop