Click here to output the results.
<script> for (i=1; i < 101; i++) { if ( (i%3 == 0) && (i%5 == 0) ) { document.write(i + " FizzBuzz<br>"); } else if (i%3 == 0) { document.write(i + " Fizz<br>"); } else if (i%5 == 0) { document.write(i + " Buzz<br>"); } else { document.write(i + "<br>"); } } </script>
No comments:
Post a Comment