Stuck on 6/5, your second for loop, getting SytaxError: Unexpected Token


#1

/*jshint multistr:true */

var text = "aofdnhodfhsodigfnjo sh Clinton fohsokfhOIuoigpoiuhsgiufhgsjdho Clinton  ";
var myName = "Clinton";
var hits = []

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

any help appreciated


#2

this bit in your second for loop:

(myName.length + i > j;

uhm.. what brackets match to (? I don't see a matching bracket

One more thing, the semi-colon at the end of this line:

for(var j = i; (myName.length + i > j; j++); <- this one

is a very dangerous one, it prevents the loop from executing properly


#3

ah, thanks. Im terrible with brackets atm lol