How is this not passing?


#1

I usually fly by JavaScript but I can't seem to figure out why this is not passing. Can someone please be of assistance?

var text = "Hey, how are you \ doing? My name is Fernando.";
var myName = "Fernando"; 
var hits = []; 

for (var i = 0; i < text.length; i ++); {
    if (text[i] === 'F') {
        for (var j = i; j < (myName.length + i); j ++); {
        hits.push(text[j]);   
        }
    }
}

#2

HI this line remove the ;

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

#3

Still does not seem to be working, I get this message
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.


#4

now do the same for the first for loop

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

#5

Thank you. It works properly now