Basic javascript-word blanks

Tell us what’s happening:
Describe your issue in detail here.
Hi so these code is not working i have tried everything i tried to do it myself severally , i watched a video and there wasnt a difference except the The so i added it , i even saw the solution and did exactly that and it still didnt work

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” + myAdjective + “” + myNoun + “” + myVerb + “” + 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" + myAdjective + "" + myNoun + "" + myVerb + "" + myAdverb + "."; // Change this line
// Only change code above this line

Your browser information:

User Agent is: Mozilla/5.0 (X11; CrOS x86_64 14469.33.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.46 Safari/537.36

Challenge: Word Blanks

Link to the challenge:

What is this doing?

You need to put spaces as in “” if you want there to be spaces in your sentence since underscores and actual space button dosent reflect in js.

But those aren’t spaces. Those are two quotes with nothing in between them.

so is that whats wronge with my code and how do you put spaces on java cause i am confused

u need to write spaces between those quotes
“” => " "

1 Like

Yup. Two quotes with nothing it between "" is not the same as two quotes with a space in between " ".

Okay
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).

This is my issue cause all the order things correct, but i tried the space thing and it didnt work

What’s you new code with ‘the space thing’?

type or paste code here
const myNoun = "dog";
const myAdjective = "big";
const myVerb = "ran";
const myAdverb = "quickly";

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

You’re close. Missing one more space.

Thanks i was really stuck on this i even did a few more and came back to this one, now i understand how the space thing works

1 Like

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