Serach text for your name


#1

can someone help me with this code
/*jshint multistr:true */
var text="I am learning to code opeyemi opeyemi opeyemi\
opeyemi opeyemi opeyemi opeyemi opeyemi opeyemi opeyemi opeyemi opeyemi";
var myName="Adedola";
var hits=[];
for(var i=0; i if(text[i] === "A"){
for(var j=i; j <( i+myName.length);j++){
hits.push(text[j]);
}
}
}


#2

Your myName variable isn't in the text variable, so your loop isn't finding anything. You have to make sure that the value of myName is in text, written out
E.g
var text="Hello I am cool";
var name="cool";