📅  最后修改于: 2022-03-11 15:03:17.683000             🧑  作者: 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"]));