js string does not contain

JavaScript
"this is the string".indexOf("cake"); // -1 (does not contain)
"this string has cake".indexOf("cake"); // 16 (contains)
Source

Also in JavaScript: