Beee


#1


/*jshint multistr:true */
var text=("Kadir sabah kalktı. Ve Kadir kahvaltı etti. Kadir şu \ anda kod yazıyor.");
var myName=("Kadir");
var hits=[];
for (i=0; i<=text.length; i++);{
    if(text[i]==="K"){
        for(var j=i; j<(myName.length+i); j++) {
        hits.push(text[j]);
        }
    };
}


#2

your first for loop:

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

the last semi-colon interrupts the loop, remove it.


#3

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