#5 Second For Loop- Please help


#1



https://www.codecademy.com/courses/javascript-beginner-en-XEDZA/0/5?curriculum_id=506324b3a7dffd00020bf661
This is the first time I'm posting here so please bear with me. I have absolutely no idea what I'm doing wrong here, every post I've read seems like my code should be correct but I keep getting the same message, below:

Oops, try again. It looks like your second 'for' loop isn't pushing values to the hits array. Make sure it's working properly and that myName's text appears somewhere in the text variable.


/*jshint multistr:true */

var text = "This is some text.";
var myName = "Justin";
var hits = [];
for (var i=0; i < text.length; i++) {
    if (text[i] === "J"){
        for (var j = i; j < i + myName.length; j++) {
            hits.push(text[j]);
        }
    }
    }


#2

@chef_justone,
Try it by using

var text = "Justin This is some text. Justin";

#3

Wow, I didn't even realize I was searching for something that wasn't there! Thank you so much Leonard!