Last active
March 15, 2019 12:37
-
-
Save eniallator/f10454fc01d4336f53f97f9363891618 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
// Interesting approach: | |
f=n=>n<2?'1':f(n-1)+'\n'+((s=[n%3?'':'fizz',n%5?'':'buzz'].join``)[0]?s:n) | |
// 74 bytes | |
// Smaller version: | |
f=n=>n<2?'1':f(n-1)+'\n'+((s=(n%3?'':'fizz')+(n%5?'':'buzz'))[0]?s:n) | |
// 69 bytes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment