Search Text for Your Name #5 Your second "for" loop (PLEASE HELP)


I am stuck and not sure what is wrong. Please Help

SyntaxError: Unexpected token

/*jshint multistr:true */
var text = "My name is Jon, I ski vail. People call me Jon \
 I opened a restaurant names Jon Restaurant." ;

var myName = "Jon";

var hits = [ ]

for (var i=0; i < text.length; i++)
    if (text[i] === myName[0]) 
        for(j = i; j < (i+ (myName.length + i); j++)


this bit off code in your second for loop:

(i+ (myName.length + i)

problems: not matching number of brackets. i+ myName.length + i? why? why i twice?


This post was flagged by the community and is temporarily hidden.


thank you! those small details will get you