📅  最后修改于: 2022-03-11 15:03:57.878000             🧑  作者: Mango
function quickCheck(arr, elem) {
return arr.indexOf(elem) != -1;
}
console.log(quickCheck(["squash", "onions", "shallots"], "mushrooms"));