Second for loop


#1

Cannot Figure this out

var text= "Selma,Selma,Selma";
var myName="selma";
var hits= [];

for (var i=0; i< text.length ; i++);
if
(text[i] === "S") {
console.log("Selma")

for(var i=0; i < myName.length ; i++); {
hits.push(myName[i]);

   }
   }

5 problem with second loop
#2

Hi if you want to understand

for(var j = i; j < (myName.length + i); j++)

you could search in the forum there are many topic where it has been explain like this one

Hpe that could help you


#3

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