📜  test() javascript 代码示例

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

代码示例1
const str = "Hello World";
var item = /Hello/,  // to define the item name use /item name/
 result = item.test(str); //test() used to search for a specific item in strings
// returns "true"