agrublev
6/7/2019 - 3:02 PM

as.js

const arr1 = [1, 2, 3, 4, 5];

if (arr1.indexOf(1) !== -1) {
    console.log("Arr1 HAS the integer 1!");
}

if (arr1.includes(1)) {
    console.log("Arr1 HAS the integer 1!");
}