Skip to content

Instantly share code, notes, and snippets.

@NikhilVerma
Created December 11, 2012 14:06
Show Gist options
  • Save NikhilVerma/4258801 to your computer and use it in GitHub Desktop.
Save NikhilVerma/4258801 to your computer and use it in GitHub Desktop.
A simple JS FizzBuzz solution
for(var i = 1; i <= 100; i++){
console.log(i%3 === 0 && i%5 === 0 && 'FizzBuzz' || i%3 === 0 && 'Fizz' || i%5 === 0 && 'Buzz' || i);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment