Skip to content

Instantly share code, notes, and snippets.

@nobleach nobleach/FizzBuzz
Created Feb 10, 2015

Embed
What would you like to do?
FizzBuzz
for (var i = 1; i <= 100; i++) {
var x = '';
if(i%3===0) x += 'Fizz';
if(i%5===0) x += 'Buzz';
console.log(x=='' ? i : x);
}
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.