Struggling with madlibs

I’m struggling with the madlibs section of the javascript course!
I cant see my mistake!

It says what I have wrong is that ’ wordBlanks should contain all of the words assigned to the variables myNoun , myVerb , myAdjective and myAdverb separated by non-word characters (and any additional words in your madlib).’

Your code so far


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

// Only change code below this line
var wordBlanks = "The " + myAdjective + "brown " +  myNoun+ "just " + myVerb + "down the road" + myAdverb "."; // Change this line
// Only change code above this line

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36

Challenge: Word Blanks

Link to the challenge:

Hi @ciarastevens8 !

Welcome to the forum!

When I paste your code into the challenge, I am getting a syntax error.
You are missing a + operator at the end.
Once you fix that issue I would suggest adding a console.log(wordBlanks) to see what the result is.

You will see that there are some spacing issues.

3 Likes

Thank you so much for your help!

1 Like
const myNoun = "dog";

const myAdjective = "big";

const myVerb = "ran";

const myAdverb = "quickly";

// Only change code below this line

const wordBlanks = myAdjective + " " + myNoun + " " + myVerb + " " + myAdverb; // Change this line

// Only change code above this line

@HarshSoni Please do not post solution code and please do not post in old threads that have already been resolved.