Skip to content

Array.some seem to work in reverse in IE8 #39

@moo3

Description

@moo3

Array.some seem to work incorrectly in IE8.

[2,4,6].some( function(v) { return v%2 === 0 } );
// expected: true
// result: false

I'm trying to understand the array.some code

proto.some = function some (lambda) {
   // arguments[+1] is to fool google closure compiler into NOT adding a function argument!
   return array.iterate(this, lambda, function (val) { return !val; }, arguments[+1]);
};

My concern is around the function after lambda which returns !val. Any clue?

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