2nd for loop not pushing to array


#1



I'm on Unit 3, lesson 6, and I keep getting an error message that nothing is being pushed to the array.


Nothing is actually being pushed to the array


/*jshint multistr:true */
var text = "Chewbacca, hamburger, cookie, kid, toilet \
beef, toad, Kromm, hoity, dog, hog, Chewbacca, hamburger, cookie, Steve, kid, toilet \
beef, toad, Kromm, hoity, Steve, dog, hog, jerk ";
var myName = "Steve";
var hits = [];

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


#2

Hi you should push text[j] instead of text[i] to hits
and this part

for(i=0; i>= text.length; i++)

instead i greater and equal to text.length you should put i les than text.length lirk that

for(i=0; i < text.length; i++)

#3

Thank you that worked!