Skip to content

Fizz buzz#5

Open
bjdixon wants to merge 7 commits into
f-u-n:masterfrom
bjdixon:fizz_buzz
Open

Fizz buzz#5
bjdixon wants to merge 7 commits into
f-u-n:masterfrom
bjdixon:fizz_buzz

Conversation

@bjdixon

@bjdixon bjdixon commented Apr 10, 2016

Copy link
Copy Markdown
Member

fixes: #4

Comment thread fizz_buzz/bjdixon/fizz_buzz.js Outdated
const divisibleBy5 = divisible(5)

const fizzbuzz = (n) => {
console.log(divisibleBy3(n) ? divisibleBy5(n) ? 'fizzbuzz' : 'fizz' : divisibleBy5(n) ? 'buzz' : n)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

put brackets for readability

@bjdixon

bjdixon commented Apr 16, 2016

Copy link
Copy Markdown
Member Author

@donaldducky I agree those nested ternaries were bothering me too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fizz Buzz

2 participants