Skip to content

Array.map method doesn't pass index and the array to the callback #4

Closed
@tedbeer

Description

@tedbeer

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
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions