Skip to content

Instantly share code, notes, and snippets.

@Chuloo
Last active February 6, 2019 17:11
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 Chuloo/f792890d0a8ec4f3340d0e7dd27c6aa0 to your computer and use it in GitHub Desktop.
Save Chuloo/f792890d0a8ec4f3340d0e7dd27c6aa0 to your computer and use it in GitHub Desktop.
Check if each item in an array is less than 100
// Create new array
const array = [20, 21, 23, 15, 2]
// Create condition
const isLessThan100 = (number)=> number < 100
// Apply function
let result = array.every(isLessThan100)
// Output result
console.log(result)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment