5. Please help


I am stuck at part 5

It keeps on saying "Oops, try again. It looks like your second 'for' loop isn't pushing values to hit it's array. Make sure it's working properly and that myName's text appears somewhere in the text variable.

/*jshint multistr:true */
var text = "Hello my name is Emilia"
var myName = "Emilia";
var hits = [];
for (var i=0; i<text.length; i++); {
    if(text[i] === myName[0]) {
        for (var j = i; j < (i + myName.length); j++) {


On this line, there is a stray semicolon. Do you see it?


Yes thank you so much!


Can someone explain the coding after the if statement and beyond? I don't understand why that coding is being chosen.


If you read this link, it should clear things up:


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.