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.map method doesn't pass index and the array to the callback #4

Closed
tedbeer opened this issue Sep 29, 2013 · 1 comment
Closed

Comments

@tedbeer
Copy link

tedbeer commented Sep 29, 2013

Array.map must pass 3 arguments to the callback function: the current element, the current index and the array itself. But the current implementation passes only the first argument. Example:

var chars = ['a', 'b', 'c'];
chars.map(function( char, index, arr) {
 //do something
});
@ebirger ebirger mentioned this issue Oct 1, 2013
@gfwilliams
Copy link
Member

Thanks ebirger! This should be fixed now.

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

No branches or pull requests

2 participants