JavaScript for Loop

  1. <html>
  2. <body>
  3. <script type=“text/javascript”>
  4. var i=0;
  5. for (i=0;i<=5;i++)
  6. {
  7. document.write(“The number is ” + i);
  8. document.write(“<br />”);
  9. }
  10. </script>
  11. </body>
  12. </html>

Leave a Reply