Please help, thank you


Please help!!

The error shown is "Oops, try again. It looks like your second 'for' loop isn't pushing values to the hits array. Make sure it's working properly and that myName's text appears somewhere in the text variable."

/*jshint multistr:true */

var text = "qwewe qweew qweew qweew qweew qweew\
qweew qweew qweew JJ \
qweew qweew qweew JJ";

var myName = "JJ"

var hits = []

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

     for (var j = i; j < (myName.length + i); j++) {



Hey @objectwhiz92081! Firstly just organize your code! You do that by selecting over your code and hitting CTRL + K! Secondly your problem is that you should change myName[0], to your actual first digit of your name! I dont know why the problem that is but just change it!

Your code:

Correct Code:

if (text[i] == 'J') {

Hope it helped! If it didnt pls reply saying so!


Thanks for your reply!!

I deleted all my code while hitting Crtl + K! (using mac)

And I've changed myName[0] to "J" but still got the same error.