Skip to content

Instantly share code, notes, and snippets.

@gugutz gugutz/FizzBuzz.js
Created Jan 2, 2018

Embed
What would you like to do?
Fizz Buzz em JavaScript
function fizzBuzz() {
var numero = 0;
for (numero == 0; numero < 101; numero++) {
if (numero % 5 == 0 && numero % 3 == 0) {
console.log("FizzBuzz");
continue;
}
else if (numero % 3 == 0) {
console.log("Fizz");
continue;
}
else if (numero % 5 == 0) {
console.log("Buzz");
continue;
}
else {
console.log(numero);
}
}
}
fizzBuzz();
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.