Array.from({ length: 100 }, (v, i) => [[15, 'fizzbuzz'], [5, 'buzz'], [3, 'fizz']].find(x => (i+1) % x[0] === 0) || (i + 1))
.reduce((a, o) => a += (o[1] || o) + "\n",'')
Last active
March 1, 2019 02:55
-
-
Save jkantr/1b4abdd7be12fcbc9c5a30f283c99bbc to your computer and use it in GitHub Desktop.
"Functional" Javascript FizzBuzz solution
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment