Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save AliceWonderland/ab0cc9a0624e7fec74fb2af16006f5c5 to your computer and use it in GitHub Desktop.
Save AliceWonderland/ab0cc9a0624e7fec74fb2af16006f5c5 to your computer and use it in GitHub Desktop.
3.2 FizzBuzz w Chelsea created by smillaraaq - https://repl.it/GxRj/0
function fizzBuzz(num){
debugger;
for(var i = 1;i <= num ;i++){
if(!(i%3) && !(i%5)){
console.log('fizzbuzz');
} else if (!(i%3)) {
console.log('fizz');
} else if (!(i%5)) {
console.log('buzz');
} else {
console.log(i);
}
}
}
fizzBuzz(16);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment