Stuck in 13 conclusion Introduction to 'For' Loops in JS


#1

<PLEASE USE THE FOLLOWING TEMPLATE TO HELP YOU CREATE A GREAT POST!>

<Below this line, add a link to the EXACT exercise that you are stuck at.>
https://www.codecademy.com/courses/javascript-beginner-en-NhsaT/2/5?curriculum_id=502d635ceda910000200293b

<In what way does your code behave incorrectly? Include ALL error messages.>
SyntaxError: Unexpected identifier

var text = [jjjj kkkk llll jim tom jeff yyyy ttt rrr eeee jim tom ];

var myName = “jim”;
var hits = ;
for (var i = 0; i < text.length; i++) {
if (text[i] === “j”) {
for(var j = i; j < myName.length; i++);
console.log(text[i])
// hits.push(j);
}
};

```

Replace this line with your code.

<do not remove the three backticks above>

#2

replace the semicolon after the for loop with a {.


#3

You are incrementing i in your second for loop. You should be incrementing j there:

for(var j = i; j < myName.length; j++){
// code for loop here
}

Also, haxor789 is correct that you need an opening brace, not a semicolon, after the for loop. And don’t forget your closing brace too!