Search Text for your Name/Second for loop dont,understand


#1

/*jshint multistr:true */
var text = "Hello my name is Stevan, I like my name\
preety much since Stevan was the name of the\
famous Serbian military man.\
Also Stevan was my fathers choice";

var myName="Stevan";

var hits=[];

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

if(text[i]==="S") {

    for(var j = i; j < (myName.length+i); j++) {
        hits.push('j');
    }

    }

}


#2

What don't you understand?


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.