Wordblanks challenge in Oct 2020

I can’t seem to pass this challenge. Looks like this code is outdated or something was skipped judging by previous posts from 2017 through to 2019: Any help please?

Your code so far


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

// Only change code below this line
var wordBlanks = "The " + " " + "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/86.0.4240.75 Safari/537.36.

Challenge: Word Blanks

Link to the challenge:

you may want to review the difference between a variable and a string

also, no, this is the current version of the challenge, the surrounding code was simplified to avoid confusion, but the thing to do is still the same

If I print the value of your variable to the console, I get

The  myAdjective myNoun myVerb myAdverb.

there are not the required words

The test also says I shouldn’t directly use the values assigned to the variables. So what exactly am I supposed to do?

the words are stored inside the variables, so you need to use the variables

what’s the difference between a variable and a string?

err I used the variables and I tried using the values as well but I think the variables is what I’m supposed to use for the string, which I did earlier. Am I the confused one?

As @ilenia said, you are not using variables. You are just concatenating several strings.
You may want to review “Constructing Strings with Variables”.

If you can help me or point me in the right direction, I will appreciate it. I’ve had maybe 1 minute tutorial on this topic, understand that I’m a complete novice to this. I’ve also done exactly as it says in the “help video” and the test isn’t passing, so it’s really misleading.

have you made any change to your code?

have you reviewed how to concatenate a string with a variable?

can you see that the string you have written in the top post does not contain variables?

1 Like

solved it thanks. Just needed to remove the quotes.