Search Text for your Name


#1

I can’t seem to get past this step. Thanks in advance!

<Below this line, add a link to the EXACT exercise that you are stuck at.>
https://www.codecademy.com/en/courses/javascript-beginner-en-XEDZA/0/5?curriculum_id=506324b3a7dffd00020bf661#

<Below this line, in what way does your code behave incorrectly? Include ALL error messages.>
SyntaxError: Unexpected token ‘)’. Expected a ‘;’ after the for loop condition expression.

```

var text = "Jenn likes KU Basketball. Jenn used to work for Kansas Athletics."
var myName = "Jenn"
var hits = []
for(var i = 0; i < text.length; i++) {
}
if (text[i] === ‘J’) {
for(var i = j < (myName.length + i); j++); {
hits.push(text[j]);
}
}
}

<do not remove the three backticks above>

#2

Loop body is empty. Code should be inside this body.


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.