JavaScript Log it!


Hello there.
I get the "SyntaxError: Unexpected token . " error whenever I run my code. Here it is:

/*jshint multistr:true*/ 

var text = "blah blah blah blah Lawrence blah blah bah \
blah bah lbah blah blah blah blah blah blah Lawrence \
 blah bah blah blah blaha blah";

var myName = "Lawrence";

var hits = [];

for (var i = 0; i < text.length; i++) {
    if (text[i] === 'L') {
        for (var j = i; j < i+ (myName.length); {
if (hits.length === 0) {
    console.log ("Your name wasn't found!"); 
else {
    console.log (hits);

what could be the problem? thanks in advance!


This for loop is the problem have a look at what you did for the previous one.
PS: And read this to learn how to make your code look readable: