Have a problem with "Your second "for" loop"



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.

Hello, it seems to me that there is something wrong with this exercice. I have a mistake message that tells me that it cant push values into hits array. So here is my code, hope you will help.

var text = "some text"
var myName = "Jean"
var hits = []

for (var i = 0; i<text.length; i++){
    if(text[i] === myName[0]){
        for(var j = i; j< (i+myName.length); j++){


Hi you should put at least once your name in the variable text

var text = "some text"