Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
"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