array prototype every code example
Example 1: js find array return true false
['one', 'two'].some(item => item === 'one') // true
['one', 'two'].some(item => item === 'three') // false
Example 2: javaascript all
function isBigEnough(element, index, array) {
return element >= 10;
}
[12, 5, 8, 130, 44].every(isBigEnough);