Skip to content

Instantly share code, notes, and snippets.

@diessica
Created April 25, 2016 01:09
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save diessica/1f56ea1ff6fd7a2139e1c09fea434585 to your computer and use it in GitHub Desktop.
FizzBuzz.js
for (var n = 0; n < 100; n++) {
var word = ''
if (n % 3 === 0) word += 'Fizz'
if (n % 5 === 0) word += 'Buzz'
console.log(word || n)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment