📜  javascript 包括获取“hi”和“high”问题的方法 - Javascript 代码示例

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

代码示例2
var str = 'hilly';
var value = str.includes('hi'); //true, even though the word 'hi' isn't found
var value = /\bhi\b/.test(str); //false - 'hi' appears but not as its own word