Blanked out due to Word Blanks

Tell us what’s happening:
I’m pretty sure I followed the instructions, even read up on similar problem like mine, but it still won’t work! Somebody, please help.

Your code so far

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

// Only change code below this line
const wordBlanks = "That " + "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/99.0.4844.74 Safari/537.36

Challenge: Word Blanks

Link to the challenge:

1 Like

Words that are in quotes will be string literals. That means that "myAdjective" will print the word “myAdjective” instead of the the value in the variable (in this case “big”).

Your string right now would print “That myAdjective myNoun myVerb myAdverb .”

Took out the quotes but still didn’t work.

What is your updated code?

const wordBlanks = "That "+ myAdjective  + myNoun  + myVerb  +myAdverb +"."; // Change this line

That’s the challenge. We need to see the code!

Edit: ah, there it is!

Now though, you don’t have any spaces between words, soyoursentencewilllooklikethis.

That’s the problem.
To give it spaces, I’ll have to add those quotations that end up making it to be read literally. What to do?

You could add a string that just has a space inside of it?

Still didn’t. Omo, I’m literally frustrated.

const wordBlanks = "That "+"myAdjective "+"myNoun "+"myVerb "+"past "+"quite"+"myAdverb "+"."; // Change this line

No… You’ve gone back to the thing you were told is wrong… If it was wrong then, its probably still wrong now, lol

console.log("cat" + "dog");
// which will look more like what humans can read?
console.log("cat" + " " + "dog");

Can this get any more complicated? :slightly_smiling_face: I’ll just leave it for sometime and think it through, hopefully, I’ll understand what it is I’m supposed to do. Thank you for your time.
I’ll drop a feedback tomorrow.

This stuff definitely can be complicated - though you might be overthinking this a tad. Remember, adding two raw strings together is the same thing as adding a raw string and a variable holding a string. console.log("dog" + " " + "woofs"); is the same as let pet = "dog"; console.log(pet + " " + "woofs");

2 Likes

Lmao, fcking did it! :melting_face: :smiling_face_with_three_hearts: Thank you and Ariel so much.

3 Likes

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