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

_.each() no longer returns object #73

Closed
Guiswa opened this issue Dec 3, 2010 · 2 comments
Closed

_.each() no longer returns object #73

Guiswa opened this issue Dec 3, 2010 · 2 comments
Labels

Comments

@Guiswa
Copy link

Guiswa commented Dec 3, 2010

It looks like _.each() doesn't return the object any more. The return statement was left off in commit 2d06e1d.

@jashkenas
Copy link
Owner

I'm afraid this is on purpose -- to make the function compliant with ECMAScript 5's forEach, which also doesn't return a value. I've added a note to the change log:

3b916a2

Closing the ticket...

@jareware
Copy link

I wonder if there could be some other function that WOULD still return the object... or is there some other nice way of iterating a collection between a _.chain() and .value()..? _.map() doesn't seem right if I'm not actually mapping the items into something new.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants