I don't know what's wrong. Help!


#1

This what I have but It says unexpected token. I don't know what is the problem.

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

#2

should be,

j++

This,

hits.push('A')

should be,

    hits.push(text[j])

#3

j+=

I don't know if this is something that can be used in JS.... try putting j++. :smiley:

Also:
the purpose of the second for loop is to find myName in the text. SOOOO you're supposed to push j, not 'A'.


#4

Yes it can be used, so long as there is a value on the Right Side

j += 1