node js has in string code example
Example 1: javascript string includes
const s = 'I am going to become a FULL STACK JS Dev with Coderslang';
console.log(s.includes('FULL STACK')); // true
console.log(s.includes('cheeseburger')); // false
Example 2: js string does not contain
"this is the string".indexOf("cake"); // -1 (does not contain)
"this string has cake".indexOf("cake"); // 16 (contains)