📌  相关文章
📜  在数组 javascript 代码示例中查找字符串

📅  最后修改于: 2022-03-11 15:02:50.898000             🧑  作者: Mango

代码示例5
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"]));