Skip to content

Instantly share code, notes, and snippets.

@shaunwallace
Created November 19, 2014 14:44
Show Gist options
  • Save shaunwallace/cee3c02f54de279ddb7b to your computer and use it in GitHub Desktop.
Save shaunwallace/cee3c02f54de279ddb7b to your computer and use it in GitHub Desktop.
Array.prototype.some()
function isBigEnough(element, index, array) {
return element >= 10;
}
var passed = [2, 5, 8, 1, 4].some(isBigEnough); // passed is false
passed = [12, 5, 8, 1, 4].some(isBigEnough); // passed is true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment