Your second "for" loop


What is wrong?


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.


Cool, You right, thanks!:smiley:


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