Help on # 5 it wont push


#1

var text = "I my adam is adam cuz ur adm"

var text = "I my adam is adam cuz ur adm"

var myName = "adam"

var hits = []

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

    }
}

please help


#2

you have too many h's >>>> hhits.push


#3

The first loop, i should be less than the length of your text, the syntax should be:

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

And yes, you had double "h" for hit, plus, you should add text[j] to your array instead of text[i].

Hope it's clear.


#4

you should push text[j]


#5

thank you very much such a simple rookie mistake