Created
April 25, 2016 01:09
-
-
Save diessica/1f56ea1ff6fd7a2139e1c09fea434585 to your computer and use it in GitHub Desktop.
FizzBuzz.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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