Syntax error: Unexpected end of input Please Help!


#1



https://www.codecademy.com/en/courses/javascript-beginner-en-XEDZA/0/5?curriculum_id=506324b3a7dffd00020bf661


Syntax error: Unexpected end of input


var text = "Micheline thingys and thingys there are tons of them more things and thingys Micheline";

var myName = "Micheline";

var hits = [];

for (var i = 0; i < text.length; i++)
{
    if (text[i] === "M");
    {
        for (var j = i; j < (myName.length + i); j++)
        {
            hits.push(text[j]);
        }
    }
};


#2

no semicolon should be here


#3

Thank you. I took the semicolon out but still getting the same error.


#4

Try resetting the lesson and pasting in code again or refreshing code..


#5

@zainabrawat Thank you! That worked :slight_smile: