Why is this answer not getting pass?

This is the link to the lesson
here is my answer:

var myNoun = "dog";
var myAdjective = "big";
var myVerb = "ran";
var myAdverb = "quickly";

// Only change code below this line
var wordBlanks = "My " + myNoun " is " + myAdjective + " so my friend " + myVerb + " very " + myAdverb ; // Change this line
// Only change code above this line

The editor returns this error

SyntaxError: unknown: Missing semicolon. (7:31)

  5 |
  6 | // Only change code below this line
> 7 | var wordBlanks = "My " + myNoun " is " + myAdjective + " so my friend " + myVerb + " very " + myAdverb ; // Change this line
    |                                ^
  8 | // Only change code above this line

Where am I going wrong?

The error message points it out: there is a β€œ+” missing.

1 Like

oh -
i was focusing on the fact it said Missing semicolon. (7: 31)

Yeah error messages are more like an indicator where the interpreter found an error and what it expected - the error usually is something else and can be even in a different line.
For example forgetting to close parenthesis but the interpreter only notices it 5-15 lines later so you gotta figure out yourself where it came from…

good to know
thank you

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