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

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>