Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
JS FizzBuzz
for (number = 1; number <= 100; number++) {
if (number % 3 == 0 && number % 5 == 0) {
console.log ("FizzBuzz");
} else if (number % 3 == 0) {
console.log ("Fizz");
} else if (number % 5 == 0) {
console.log ("Buzz");
} else {
console.log(number);
}
}
Owner

jamesnotjim commented Sep 20, 2017

Nothing fancy, just a Fizz Buzz solution in JavaScript.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment