📜  js 字符串不包含 - Javascript 代码示例

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

代码示例1
"this is the string".indexOf("cake"); // -1 (does not contain)
"this string has cake".indexOf("cake"); // 16 (contains)