5/7 I need help


#1

var text = "fhasdjkfhjksdhAdrianfjkasdfaskdjfAdrianajskdf";
var myName = "Adrian";
var hits = [];

for (var i = 0; i < text.length; i++) {

if ( text[i] === "A" ) {

for ( var j = i; j < myName.length );

hits.push( text[j] ) ;

}

}

what did i do wrong?


#2

syntax error here check this for loop and compare it to the first one you wrote


#3

Remove the semi-colon after the second for loop


#4

It seems that your second for loop is missing the increment bit, and that myName.length should be myName.length + i since it is searching for your whole name. I believe it should be:
for ( var j = i; j < myName.length + i; j++)