Strings In Depth9 / 18
Up next

Search text

const s = "hello world";
console.log(s.includes("world"));
// indexOf returns the position, or -1 when absent
console.log(s.indexOf("o"), s.indexOf("z"));
What you're solving

includes and indexOf