Skip to content

Instantly share code, notes, and snippets.

@hoorayimhelping
Last active June 19, 2018 12:39
Show Gist options
  • Save hoorayimhelping/52da4e0dd50c59dccb8df426077b4cd2 to your computer and use it in GitHub Desktop.
Save hoorayimhelping/52da4e0dd50c59dccb8df426077b4cd2 to your computer and use it in GitHub Desktop.
javascript limit = { upper: 50, lower: 1 }
arr2 = [13,4,5,6,7,8,9];
function checkThreshold(curr) { return curr > this.lower; }
console.log(arr2.every(checkThreshold, limit)) // returns true
console.log(arr2.every((curr) => curr > this.lower, limit)) // returns false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment