public
Created

  • Download Gist
fizzbuzz.js
JavaScript
1 2 3 4 5 6 7 8 9 10 11
for (var i = 1; i <= 100; i++) {
if (i % 15 == 0) {
console.log("FizzBuzz");
} else if (i % 3 == 0) {
console.log("Fizz");
} else if (i % 5 == 0) {
console.log("Buzz");
} else {
console.log(i);
}
}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.