📅  最后修改于: 2022-03-11 14:56:39.653000             🧑  作者: Mango
function quickCheck(arr, elem) {
return arr.indexOf(elem) >= 0 ? true : false;
}
console.log(quickCheck(["squash", "onions", "shallots"], "mushrooms"));