Already answered above but wanted to share.
Will not work in IE though. thanks for mentioning it @Mahmoud
var array1 = [1, 2, 3];_x000D_
_x000D_
console.log(array1.includes(2));_x000D_
// expected output: true_x000D_
_x000D_
var pets = ['cat', 'dog', 'bat'];_x000D_
_x000D_
console.log(pets.includes('cat'));_x000D_
// expected output: true_x000D_
_x000D_
console.log(pets.includes('at'));_x000D_
// expected output: false
_x000D_
got some reference Here. they also have Polyfill for above.