Word Blanks issue!

Tell us what’s happening:
Describe your issue in detail here.

What am I missing?

Your code so far


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

// Only change code below this line
const wordBlanks = "My" + "dog" + "is very" + "big" + "but he" + "ran" + "so" + "quickly" + "."; // 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/99.0.4844.51 Safari/537.36

Challenge: Word Blanks

Link to the challenge:

Two things

  1. Try console.log(wordBlanks) - your words are run together

  2. You aren’t using myNoun, myAdjective, myVerb, or myAdverb

You dont have to use the words directly. You have to create the final sentence using the variables.

Re-read the instructions for the challenge

I did that. Still not passing the last one 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).

till not passing the last one 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).

What does it look like with your updated code?

That’s the link to the challenge. What is the code that you wrote?

const wordBlanks = "My" + "myNoun" + "is very" + "myAdjective" + "but he" + "myVerb" + "so" + "myAdverb" + "."

This brings us to my first point:

You don’t have any spaces between your words

Also, you need to use the variable itself. You can’t wrap the variable names in quotation marks.

const wordBlanks = "My" + "myNoun" + "is very" + "myAdjective" + "but he" + "myVerb" + "so" + "myAdverb" + "."; 

console.log(wordBlanks);

You should probably try to fix this…

And you should probably try to fix this…

const wordBlanks = "My" + myNoun + "is very" + myAdjective + "but he" + myVerb + "so" + myAdverb + "."; 

console.log(wordBlanks);

@JeremyLT still not passing

look at the sentence that appear in the console, and confront it with the requirements, Do you have spaces in all the right places?

2 Likes

[quote=“JeremyLT, post:12, topic:499856”]

You don’t have any spaces between your words!

I resolved it. Thank you

1 Like

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