Number 5


#1

var text = "Hello, how are you\
doing? My name is Erik.";
var myName = "Erik";
var hits = [];
for(var i = 0; i < text.length; i++){
}
if (text[i] === 'E') {
}
for(var j = i;j<(i + myName.length);j++){
hits.push(text[j]);
}

Keeps saying this- Oops, try again. Make sure you're pushing letters to the hits array!


#2

You closed your first loop, but the second loop needs to be inside of it.


#3

it worked when i put a 4 inside of this- hits.push(text[j]);
}