Skip to content

Instantly share code, notes, and snippets.

@eniallator
Last active March 15, 2019 12:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eniallator/f10454fc01d4336f53f97f9363891618 to your computer and use it in GitHub Desktop.
Save eniallator/f10454fc01d4336f53f97f9363891618 to your computer and use it in GitHub Desktop.
// 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