Created
September 20, 2015 15:00
-
-
Save chuck0523/8ab1a72d694625bc122e to your computer and use it in GitHub Desktop.
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
"use strict"; | |
var log = function log(x) { | |
console.log(x); | |
}; | |
var mixedAry = [10, 23, 4, 0, 77]; | |
var isEven = function(x) { | |
return x % 2 === 0; | |
}; | |
var a = mixedAry.some(isEven); | |
log(a); // true | |
var evenAry = [2, 14, 64, 8]; | |
var b = evenAry.some(isEven); | |
log(b); // true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment