Skip to content

Instantly share code, notes, and snippets.

@eprislac
Created February 22, 2019 08:30
Show Gist options
  • Save eprislac/01f6fd9e410070c613bd722b9ff0843e to your computer and use it in GitHub Desktop.
Save eprislac/01f6fd9e410070c613bd722b9ff0843e to your computer and use it in GitHub Desktop.
(() => {
'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