Your second "for" loop not working


It's constantly saying "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."

var text = "Cutie Ervin Ervin Sports Ervin Word Ervin Pretending \ To Have Actual Words Ervin";
var myName = "Ervin";
var hits = [];
for (var i = 0; i > text.length; i++) {
    if(text[i] === 'E') {
for (var j = i; j < (myName.length + i); j++) {



for ([initialization]; [condition]; [final-expression]) {

In your 1st FOR-loop
you _initialize i with the Value 0 zero
then in your condition you test if i is =greater than= text.length
and that is NOT going to happen !!!!!!


google search
== the Book ==
javascript [your question]

== discussions / opinions ==
javascript [your question]

== guidance == <---JavaScript code-convention


Wow, thanks. I feel kinda dumb for not seeing that.