Help please! Second for loop!


#1

I am trying to complete the task for making the second for loop. I keep getting the error:

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

Here is my code:
/*jshint multistr:true */
var text = "marc blue blue blue blue marc blue blue blue marc";
/*console.log("marc blue blue blue blue marc blue blue blue marc".length)*/
var myName = "marc";
var hits = [];
for (var i = 0; i < text.length; i ++);
{
if (text[i] === "m")
{
for (var j=i; j < i+myName.length; j++)
{
hits.push(text[j]);
}
}
}


#2

@microsurfer57175

Look here

The syntax of your if statement doesn't seem right. Where are the curly brackets???


#3

Nevermind i found the problem after about 4 hours.


#4

@microsurfer57175 can you us how you did please