Skip to content

add script.js#110

Open
rcs784 wants to merge 3 commits intobloominstituteoftechnology:masterfrom
rcs784:master
Open

add script.js#110
rcs784 wants to merge 3 commits intobloominstituteoftechnology:masterfrom
rcs784:master

Conversation

@rcs784
Copy link
Copy Markdown

@rcs784 rcs784 commented Jan 8, 2018

No description provided.

Comment thread src/arrays.js
const newStartingValue = (startingValue === undefined) ? elements[0]
: startingValue;
return (newArray.length > 0) ? cb(newStartingValue, reduce(newArray
.slice(1), cb, newArray[0])) : newStartingValue;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I like this very interesting approach. Ternary operators are certainly cool, but they're not always the most readable. You may want to review your solution when you get time- it seems you've forgotten to combine the elements. This is an awesome effort, however, so thanks for sharing.

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.

2 participants