SyntaxError: Unexpected token )


#1


https://www.codecademy.com/en/courses/javascript-beginner-en-XEDZA/0/5?curriculum_id=506324b3a7dffd00020bf661#


The console says SyntaxError: Unexpected token )


var text = "Shrike rhjdl;afajd;va'afojvbamld,ng;afvl;acb'a";
var myName = "Shrike";
var hits = [];
  for (i=0; i<text.length; i++) {
      if (text[i]===myName[0]) {
          for (j = i; j=i+myName.length) {
              hits.push(text[j]);
          }
      }
  }


#2

The above does not look right. Can you see the error and omission?


#3

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