Created
August 2, 2014 16:08
-
-
Save mojaray2k/a9b378c8c75b010f9877 to your computer and use it in GitHub Desktop.
Array.prototype.some() is supported in IE9+, and there is a polyfill shown on https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Array/some
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var a = [1, 3, 5, 7, 9], | |
b = [1, 3, 4, 8, 9]; | |
console.log(a.some(function (c) { | |
return c % 2 === 0; // false | |
})); | |
console.log(b.some(function (c) { | |
return c % 2 === 0; // true | |
})); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment