Basic JavaScript - Word Blanks

Hi I’ve been stuck on this one for awhile any help would be appreciated
Describe your issue in detail here. I swear I’m doing it right but???

// Only change code below this line

const wordBlanks = “The” + myNoun + “was” + myAdjective + “and” + myVerb + “very” + myAdverb + “.”; // Change this line

// Only change code above this line

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

// Only change code below this line
const wordBlanks = "The" + myNoun + "was" + myAdjective + "and" + myVerb + "very" + 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/113.0.0.0 Safari/537.36

Challenge: Basic JavaScript - Word Blanks

Link to the challenge:

This exercise expects you to return a sentence.
You must bear in mind that each word needs a space.
For example:
const myNoun = “dog”;
const wordBlanks = "My " + myNoun;

You can see how after the word 'My ’ there is a space. You must take that into account for each word.

1 Like

A good habit to get into is to use console.log when you’re not sure why your code isn’t working. You can use this to show what your variables/functions etc are returning so you can see more easily what might be going wrong.

If you console.log(wordBlanks) at the bottom of your code, you’ll see immediately what is going wrong.

1 Like

Thanks to you both! I figured it out after a long hard think at what I was doing wrong lol. I believe I did indeed forget about the spaces.

1 Like

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