I can't figure out where I'm missing a semicolon

I’m getting the following error for my code for this challege: Missing semicolon. (7:61)

I can’t figure out what the issue is. I have a semicolon at the end of every line.

Please help!

Your code so far


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

// Only change code below this line
const wordBlanks = "The " + myNoun + " was so " + myAdjective ", but it " + myVerb + " so " + myAdverb + "."; // Change this line
// Only change code above this line

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.99 Safari/537.36

Challenge: Word Blanks

Link to the challenge:

Woops

Thanks! I can’t believe I didn’t see that.

Welcome to your first lesson of “the interpreter isn’t so smart” :wink:
It was expecting a semicolong because without the operator, it assumed the command ended there. But because more code followed, it assumed you are missing a semicolon marking the end and the start of a new command.

Keep in mind JavaScript doesn’t actually need semicolon at the end of lines to. It’s good practice to have them there though.

1 Like

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