indexOf
var numbers = [3, 5, 8, 11, 23, 7]; if (numbers.indexOf(1) !== -1) { // ... }
includes
var numbers = [3, 5, 8, 11, 23, 7]; if (numbers.includes(1)) { // ... }
Подробнее