Second Loop, help!


#1


So..I'm stuck here...anyone can help me?...Thanks!

var text= "Hey baby how's my Ana in your face doing?";
var myName= "Ana";
var hits= [];

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

#2

You should read the error message that you received...

Does this look right to you? You're missing a closing parenthesis, )


#3

Thanks for the help! :slight_smile:


#4

No problem :))))))))


#5

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