you can use Array.prototype.some for this purpose also.
var arr = [true, false, true,false, true]
if(arr.some((elem)=> elem === true))
{
console.log('contains true')
}
You can also use Array.prototype.findIndex method. If not found it will return -1.
if(arr.findIndex(elem=>elem === true)!=-1){
console.log('contains true')
}
Object.is ( ) uses ===
internally. So you can use it as well
if(arr.some(elem=>Object.is(elem,true))){
console.log('contains true')
}
array.prototype.indexOf also uses ===
internally.
if(arr.indexOf(true) != -1){
console.log('contains true')
}
There are so many ways to choose from.Pick the one that suits your need.