array some method not returning any value javascript 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: javascript array some
let array = [1, 2, 3, 4, 5];
//Is any element even?
array.some(function(x) {
return x % 2 == 0;
}); // true