Created
April 8, 2016 12:35
-
-
Save sp90/074ae9b0e6c3a7874c91e1039d2d4578 to your computer and use it in GitHub Desktop.
This file contains 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 i = 1; i < 101; i++) { | |
var buzz = (i % 5 == 0) ? 'Buzz' : i; | |
var fizz = (i % 3 == 0) ? 'Fizz' : buzz; | |
var fizzBuzz = (i % 3 == 0 && i % 5 == 0) ? 'FizzBuzz' : fizz; | |
console.log("fizzBuzz: ", fizzBuzz); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment