5. Your Second For Loop


#1

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

the output says unexpected token )

can't find where.


#2

this bit in your second for loop:

 (i + myName.length),

you use a comma at the end, rather then a semi-colon


#3

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