5/7 not pushing


#1

var text = "Hey, how are you doing? My name is Kenny.";
var myName = "Kenny";
var hits = [];

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

why is this not working? getting message "It looks like your second 'for' loop isn't pushing values to the hits array."

thanks


#2

Try setting i < text.length in you first for loop?


#3

silly mistake, thank you!