Created
February 22, 2019 08:30
-
-
Save eprislac/01f6fd9e410070c613bd722b9ff0843e to your computer and use it in GitHub Desktop.
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
(() => { | |
'use strict' | |
const fizzbuzziness = (num) => { | |
const tbl = Object({ 'Fizz': (num % 3 === 0), 'Buzz': (num % 5 === 0) }) | |
return Object | |
.keys(tbl) | |
.filter(key => tbl[key]) | |
.reduce((acc, curr) => { return `${acc}${curr}` }, '') | |
} | |
})() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment