What am i doing wrong 5/7


#1

var text = "i have to go handle some buisness but i need to stay and finish this.";
var myName = "Antonio";
var hits = [];
for(var i=0; i if(text[i]==="A"){
for(var j=i; j<(i+myName.length;) j++){
hits.push(myName);
hits[0];
}
}
}


#2

You don't need "hits[0];"


#3

Also, you didn't mention "Antonio" in your var text


#4

try this code below:
var text ="insert text here";
var myName = "yourName";
var hits = [];
for(var i = 0; i < text.length; i++){
if(text[i] === 'x'){ // x being the first letter of your name in the text variable.
for(var j = i; i < myName.lenght + i; j++){
hits.push(text[j]);
}
}
}