Basic JavaScript: Word Blanks need help with the last checkmark

Tell us what’s happening:

The code I made is under the comments, I need help passing the last checkmark.

Below this sentence is what needs to be fixed.
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).

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

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 + "" + myNoun + "" + myVerb + "" + 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/80.0.3987.163 Safari/537.36.

Challenge: Word Blanks

Link to the challenge:

Are there supposed to be spaces in between the words?

Yes, because I followed the video tutorial and he put spaces after “the”, and removing spaces doesn’t change anything. Removing all the spaces doesn’t help either.

I agree, there needs to be a space between each of the words.

I agree, there needs to be a space between each of the words.

"" - empty string
" " - space

Thank you, albiet why does need it?

In this case, because the instructions call for it:

You will also need to account for spaces in your string, so that the final sentence has spaces between all the words. The result should be a complete sentence.

1 Like