Created
March 6, 2018 16:39
-
-
Save ukmadlz/f6c1f5f72ccf915fea4d9cab69e8e742 to your computer and use it in GitHub Desktop.
FizzBuzz without a for and on one line
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
console.log([...Array(100).keys()].map(function (i) { return 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