What is the problem?>


#1



Replace this line with your code. 
var text= " Manal Manal Manal ";
var myName = "Manal";
var hits=[];
for(  i=0 ;i<text.length ;i++){
    if(text[i] === 'M'){
        for ( j=i; j< myname.length+i ;j++){
            hits.push(text'j');
        }
    }
}
console.log(hits);


#2

Hi you should .push() inside hits text[j]


#3

it is not the problem i write it and i get this massege
Oops, try again. Careful: your second 'for' loop should stop when it reaches its current point in the string + myName.length.


#4

can you post your new code?


#5

sure

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


#6

This part

for ( j=i; j< myname.length+i ;j++)

you should change myname.length with myName.length


#7

Thank you :relaxed: