Skip to content

Instantly share code, notes, and snippets.

Embed
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);
}
}
@jamesnotjim

This comment has been minimized.

Copy link
Owner Author

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
You can’t perform that action at this time.