smooshie

fizzbuzz 3

Jul 8th, 2012
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // see the Hint button if you're not sure how to start
  2.  
  3. for (i=1; i<21; i++) {
  4.     if (i%3===0) {
  5.         console.log("Fizz");
  6.     }
  7.     else if (i%5===0){
  8.         console.log("Buzz");
  9.     }
  10.     else {
  11.         console.log(i);
  12.     }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment