Oops, try again. There was a problem with your syntax


#1



var text="Hi!! I am Rohit";
var myName="Rohit";
var hits=[];
for(i=0;i<=text.length;i++){
    if(text[i] === 'R'){
        for(var j=i;j<(i+myName.length);j++){
            hits[].push(text[j]);
            };
        }
    }


#2

HI this line

hits[].push(text[j]);

just remove the [] from hits[]


#3

Thanks again bro .. you rock your job .. Thanks