📅  最后修改于: 2022-03-11 15:02:50.898000             🧑  作者: Mango
function checkInput(input, words) {
return words.some(word => new RegExp(word, "i").test(input));
}
console.log(checkInput('"Definitely," he said in a matter-of-fact tone.',
["matter", "definitely"]));