I'm trying to make an application that repeats the word "blah" every second and stops repeating it after 100 times. For some reason, it only says it once. Here's my code:
Could someone explain what I did wrong?Code:<html> <head> <title> animation </title> <script type = "text/javascript"> var a = 0; var b = 0; setTimeout(a++, 1000); </script> </head> <body> <script type = "text/javascript"> while (a == 1) { document.write('blah'); b++; if (b == 100) { a = 10; } else { a = 0; } } </script> </body> </html>
Thanks in advance.


Reply With Quote

Bookmarks