3/7 Your first "for" loop


#1

/*jshint multistr:true */
var myName = "Katie";
var hits = [];
var text.length. = "Katie";
what do i next plz help


#2

@designninja16000 take a look at this post to get an idea what to do

Click here to post


#3

First careful, you try to make a variable with text.length. ,it will make an error.

you should try this instead

var nameLength = myName.length

Try a for loop at the end of your code.

for(var i=0; i<nameLenght; i++){ 
  //here your code
}

Your code should start something like this :

/*jshint multistr:true */
var myName = "Katie";
var hits = []; 
var nameLength = myName.length
for(var i=0; i<nameLength; i++){ 
      //here your code
    }

#4

var nameLength = myName.length
for (var i = 0; i console.log("anhcuong");
}