Second 'for' loop isn't pushing values to the hits array


#1

/*jshint multistr:true */

var text="hello, my name is rasna";
var myName="rasna";
var hits=[];

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

    }}

CAN ANYONE HELP?


#2

In the first FOR loop, change ">" to "<". That should fix it...