3. Your first "for" loop


#1

https://www.codecademy.com/courses/javascript-beginner-en-XEDZA/0/3?curriculum_id=506324b3a7dffd00020bf661#

In the error message box, it says "Oops, try again. There was a problem with your syntax." On the console, it says SyntaxError: Unexpected token <

I know that this means there is a problem with the < in the for loop, but I can not figure out why < would be the problem.


var text = "xng fkjngJadeojbfkdJadeuhahgJade";
var myName = "Jade";
var hits = [];

for (var i=0, i<text.length; i++){
}


#2

You have a comma , after var i=0 instead of a semicolon ; .


#3

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