Basic JavaScript - Word Blanks

Tell us what’s happening:

Hi, I seem to be stuck with this problem and I dont really understand what is needed here. Please assist

Your code so far

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

// Only change code below this line
const wordBlanks = "myAdjective, myNoun, myVerb, myAdverb";
var result = "My" +"pretty" + myAdjective + "brown"+ myNoun + "queitly" + myVerb + "home" + myAdverb + "."
// 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/120.0.0.0 Safari/537.36

Challenge Information:

Basic JavaScript - Word Blanks

You appear to have created this post without editing the template. Please edit your post to Tell us what’s happening in your own words.

Hi @Ovie2

Here is a console.log of you result variable:

Myprettybigbrowndogqueitlyranhomequickly.

You will need to add spaces to the strings.

Happy coding

Hi @Teller Thank you for your assistance. However I have added the spaces and this is what it says,
wordBlanks should contain all of the words assigned to the variables myNoun, myVerb etc separated by non word characters. My code has all of this I just dont understand what the problem is

can you show what your code is now?

Hi @ilenia

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

// Only change code below this line
const wordBlanks = "myAdjective, myNoun, myVerb, myAdverb";
var result = 'My '  +  ' pretty ' +  myAdjective  + ' brown ' + myNoun  +  ' queitly '  +  myVerb  +  ' home '  +  myAdverb  +  ' . '
// Only change code above this line

why is this your answer? you need to give to wordBlanks the required value

this one looks pretty good, if only you were assigning it to the right variable…

@ilenia When I put the words dog, big, ran, and quickly the test does not run beacuse it says I should not use these words directly. Thats why I used Const wordBlanks as the following, they run through successfully

You need to use those as variables, not as strings, like you did in the following line. The challenge is checking the value of wordBlanks, so you need to assign the string you write with the variables to that one

If this is what you mean @ilenia , the test does not run but says I must not use these words directly.

const myNoun = “dog”;
const myAdjective = “big”;
const myVerb = “ran”;
const myAdverb = “quickly”;

// Only change code below this line
const wordBlanks = “big, dog, ran, quickly”;
var result = 'My ’ + ’ pretty ’ + myAdjective + ’ brown ’ + myNoun + ’ queitly ’ + myVerb + ’ home ’ + myAdverb + ’ . ’
// Only change code above this line

delete the line with var result, instead build that string where you use + between the given variables and smaller strings in the variable wordBlanks