The Value of an Element in an Array [Help]


#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-XEDZA/0/4?curriculum_id=506324b3a7dffd00020bf661#

<In what way does your code behave incorrectly? Include ALL error messages.>
Oops, try again. Remember how to check the value of an element in an array? You simply do arrayName[i]. Check the Hint if you need help!

Not sure why this errors^ popping up please help.

```

Replace this line with your code.

/*jshint multistr:true */
var text= “Hey what is up coders
my names Fabio! Fabio is an amazing
name, i am also very sexy. Fabio
is a very sexy name.”;
var myName = ‘Fabio’;
var hits=;
for(var i=0; i <= text.length; i++){
if (myName[i] === ‘F’) {
}
}

<do not remove the three backticks above>

#2

HI your for loop loop throught the var text so you should use text[i] instead of myName[i]


#3

Wow! Thanks, I thought it wasn’t true because |text[i]===‘H’|, wouldn’t this make my if statement false?


#4

Yes, it will but since you have nothing inside your if statement so even if it evalue to false now it will make you pass the lesson.