I can not get past this:(


#1

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

This is my code:

/*jshint multistr:true */

var text = "This is some text and my name is Colt. Eaves Ashton Colt.";
var myName = "Colt";

var hits = [];

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

the link at the top is to the lesson. I have been stuck on this for a week now!!! I was FLYING through this until just now. What is wrong :(?

Thank you all for any and all help.


#2

Hope this helps! It took me another week of studying explanations to know how this works, lol