How do i fix this code in Search text for your name 5


#1

Excluding first line what is wrong with this code? It keeps responding "Oops, try again. It looks like your second 'for' loop isn't pushing values to the hits array. Make sure it's working properly and that myName's text appears somewhere in the text variable."

/*jshint multistr:true */
var text = "Hey, how are you \
doing? My name is Callum.";
var myName = "Callum"
var hits = []

for (var i = 0; i <= text.length ; i++);
if (text[i] === "C"){
for (var j = i; j < (i + myName.length) ; j++);
hits.push(text[j] === "C")
};
console.log(hits)


#2

Hi here

hits.push(text[j] === "C")

Just remove the === "C" inside the ( )`

And you should remove the ; after your for loops

for (var i = 0; i <= text.length ; i++);  <== this one
for (var j = i; j < (i + myName.length) ; j++); <== this one