Your "if" statement


#1

I have been banging my head against this for an hour. I must be misssing something simple, according to the hint and other support posts this should be working but it isn't. What am I doing wrong here?

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

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!

/*jshint multistr:true */

var text = "Get your shit together \
get it all together Summer.";

var myName = "Summer";

var hits = [];

for (var i = 0; i < text.length; i++){
    if(myName[i]==="S") {
        };
}

#2

You want to know if text[i] === "S" not if myName[i] === "S".


#3

Well, now I feel like a dummy! Thanks codeninja84962!