Advertisement
bejiitas_wrath

Javascript loop.

Aug 12th, 2015
415
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <html>
  2. <head>
  3. <title>Javascript fun!</title>
  4. </head>
  5. <body>
  6.  
  7. <h3>Javascript loop.</h3>
  8.  
  9. <script>
  10.     var a;
  11.     var p1 = "The world is a vampire.";
  12.  
  13.     for ( a = 0; a < p1.length; ++a )
  14.     {
  15.         document.write("<p>" + p1 + "</p>");
  16.     }
  17. </script>
  18. </body>
  19. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement