1let boolArray1 = [true, false, false]
2let boolArray2 = [false, false, false]
3
4boolArray1.some(x => x); // true
5boolArray2.some(x => x); // false
6
7// Example of using a function to evaluate array
8let numberArray = [1, 2, 3, 4, 5];
9let oddNumbers = [1, 3, 5, 7, 9];
10
11// checks whether an element is even
12const even = (element) => element % 2 === 0;
13
14numberArray.some(even); // true
15oddNumbers.some(even); // false
16
1You can use `every()` array method
2
3let data = [ {status: true}, {status: false}, {status: true} ]
4let result = data.every((i) => {
5 return i.status === true
6})
7console.log(result) // false
8
9let data = [ {status: true}, {status: true}, {status: true} ]
10let result = data.every((i) => {
11 return i.status === true
12})
13console.log(result) // true