Basic JavaScript - Word Blanks

Can anyone help me figure out why this code won’t pass?

Says 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 of your choice)."

Which I believe I’ve covered all.

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 "+"and "+"myVerb "+"so "+"myAdverb "+"towards me" + "."; 

// 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/ Safari/537.36

Challenge Information:

Basic JavaScript - Word Blanks

Take a look at the resulting string, add this at the end of your code:


Didn’t solve the problem.

It wasn’t supposed to solve it directly, but to show you a way how to reveal what is wrong.

1 Like

Yeah, its helpful cos I can now see in the console what the code is producing, thanks for that

Yep! I finally got it.
It wanted the variable + " Space" + Variable + “Space” ect…


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