The some() method will check if any element in a given array passes a supplied test (with a function). If it finds an element which passes the test, it'll stop there and will not run further (and will return true). Otherwise, it'll return false.
Here's an example:
const arr = [1, 3, 5, 7, 9, 10, 11];const isAnyElementEven = arr.some( elem => { console.log('Checking '+elem); return elem % 2 == 0});console.log(isAnyElementEven); // true
The output is as follows:
Checking 1Checking 3Checking 5Checking 7Checking 9Checking 10true
Notice that it stops at 10 once the test is passed.