Skip to content
New issue

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

array-callback-return example corrected in Readme.md for issue #1806 #2072

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

array-callback-return example corrected in Readme.md for issue #1806 #2072

wants to merge 4 commits into from

Conversation

abhinavsharma629
Copy link

@abhinavsharma629 abhinavsharma629 commented Aug 15, 2019

Fixes #1806

Copy link
Collaborator

@ljharb ljharb left a comment

Choose a reason for hiding this comment

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

Please fix all the linting errors.

However, the original issue doesn't actually have a clear solution yet, so a PR was premature.

@abhinavsharma629
Copy link
Author

Can you please check. I removed them sir.

Copy link
Collaborator

@ljharb ljharb left a comment

Choose a reason for hiding this comment

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

I'm still not clear on why reduces are better examples than filters?

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@abhinavsharma629
Copy link
Author

Reducers aren't better or less than filters, but I think for a newbie understanding the above example would be much simpler than the filter example as it clearly shows how an array is getting reduced and values returned and stored in a new array.

@ljharb
Copy link
Collaborator

ljharb commented Aug 16, 2019

There's already reduce examples above it; the purpose of the section is to talk about callbacks - showing different kinds of callbacks, like filter predicates, is useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants