We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
You are treating null and undefined initalValues wrong. They are perfectly valid initalValues but you are discarding them.
null
undefined
The real reduce returns undefined321
undefined321
[3, 2, 1].reduce((p, c) => String(p)+String(c), undefined) // undefined321
but your code produces the wrong results of 321
321
reduce([3, 2, 1], (p, c) => String(p)+String(c), undefined) // 321
The text was updated successfully, but these errors were encountered:
@WORMSS This was a great observation.
Sorry, something went wrong.
No branches or pull requests
You are treating
null
andundefined
initalValues wrong.They are perfectly valid initalValues but you are discarding them.
The real reduce returns
undefined321
but your code produces the wrong results of
321
The text was updated successfully, but these errors were encountered: