Your second "for" loop


#1

What is wrong?


#2

Line 11, you have a closing curly brace which isn't allowing the 2nd for loop to run when the 1st loop finds a 'J'.

Line 12, your loop condition should be j < myName.length + i to collect characters from the text into your hits array. Otherwise, any and all characters in the text string found after 'J' will go into the hits array.


#3

Cool, You right, thanks!:smiley:


#4

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