Last active
December 1, 2017 21:27
-
-
Save tomatohammado/9c3a15102095d1e5111b3a5cc756c243 to your computer and use it in GitHub Desktop.
fancy fizbuzz
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 (let i = 1; i <= 100; i++) { | |
| let isDivisibleByThree = i % 3 === 0 | |
| let isDivisibleByFive = i % 5 === 0 | |
| isDivisibleByThree && isDivisibleByFive ? | |
| console.log('FizzBuzz') | |
| : isDivisibleByThree ? | |
| console.log('Fizz') | |
| : isDivisibleByFive ? | |
| console.log('Buzz') | |
| : | |
| console.log(i) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment