Tell us what’s happening:
let text = “Hello, JavaScript world!”;
let result = text.includes(“JavaScript”, 7);
console.log(result); // true
always returns true, the change of number makes no difference
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36
Challenge Information:
Working with String Search and Slice Methods - How Can You Test if a String Contains a Substring?