What am I doing wrong? 3 your first for loop **😑**


#1


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


It says that there is a syntax error and that it expected ','


/*jshint multistr:true */
{
var text = "hello my name is Luke";

var hits[];

var myName = Luke;

var namelength = myName.length;

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


#2

Hi this line

var myName = Luke;

You should put Luke around " "

The here

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

You should change the , with ; The in after 0


#3

Thanks wiz for replying but now it says "unexpected token [ "


#4

Something is missing here


#5

it says to have nothing in the hits


#6

When assigning a value to a variable, what is the correct syntax? Look at your other variables for a clue :slight_smile:


#7

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