5. Second Your second for "Loop|"


#1

Where am I going wrong?? what should this look like?!!!!

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

Thanks in advance!


#2

Hello @m8v2y6cv,

Your have forgotten the open the first for loop using a curly brace: {...


#3

thanks! turns out i also forgot to input "j < (myName.lentgth + [i])"


#4

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