Help needed in for Loop 2


Hi all, I got a infinity loop from this code ,

Replace this line with your code. 
var text=("Hey, My name is Darius \
, where Darius is also a League hero")

var myName=("Darius")

var hits=[]

for (var i=0;i<text.length;i++){
    if (text[i]==='D'){
       for(var j=i;j<(i+myName.length);i++){


in the second for loop:


you increase i, why? you use j to loop over your name found in text, so it would make sense to increase j, not i


Oh right! I missed that , Thanks!