// an array
const array = [ 1, 2, 3, 4, 5 ];
// check if any of the elements are less than three (the first two are)
array.some(function(element) {
return element < 3;
}); // -> true
// ES6 equivalents
array.some((element) => {
return element < 3
}); // -> true
array.some((element) => element < 3); // -> true