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


#1



https://www.codecademy.com/courses/javascript-beginner-en-NhsaT/2/5?curriculum_id=502d635ceda910000200293b


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.


#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!