Skip to content

Instantly share code, notes, and snippets.

@chuck0523
Created September 20, 2015 14:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chuck0523/6c713aa2f923d1995f95 to your computer and use it in GitHub Desktop.
Save chuck0523/6c713aa2f923d1995f95 to your computer and use it in GitHub Desktop.
"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.every(isEven);
log(a); // false
var evenAry = [2, 14, 64, 8];
var b = evenAry.every(isEven);
log(b); // true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment