I keep getting a syntax error


#1



 /*jshint multistr:true */
var text= "blah blah blah blah blah Jake \
blah blah blah blah Jake blah blah blah \
blah blah blah Jake";
var myName= "Jake";
var hits=[];
for(var i=0; i< text.length; i++) {
    if(text[i] ==="J") {
        for(var= j=i; j< i + myName.length; j++) {
            hits.push(text[j]);
        };
    };
};


I keep getting a syntax from this but I don't know what's wrong. Can someone please help me. It keeps saying expected identifier.


#2

Hey @bigsnake

Look here

The problem here is the unexpected = sign in front of var keyword. Remove it and it should work.

Hope this helped! :slight_smile: