类似
let arr = [1, 2, 3, 4, 5];
// 检查数字3是否在数组arr中
if (arr.includes(3)) {
console.log("3 is in the array");
} else {
console.log("3 is not in the array");
}
// 检查数字6是否在数组arr中
if (arr.includes(6)) {
console.log("6 is in the array");
} else {
console.log("6 is not in the array");
}