Someone please help me


#1

var text = "Hey, how are you doing? My name is Fazil.";
var myName = "Fazil";
var hits = [];
for(var i=0 ; i < text.length ; i ++);{
if(text[i] === "Fazil"){
for(var j = i ; j < (i+myName.length) ; j++);{
hits=[];
hits.push(text[j]);

        }

}

};


#2

Hi try to 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

#3

Thanks...It works...