wordBlanks JS Challenge Help

I’ve tried to complete this challenge but I stuck in the same error whatever I try.

I get the following error:
You should not directly use the values “dog”, “ran”, “big”, or “quickly” to create wordBlanks.

My code is as follows:

var wordBlanks = "";

wordBlanks += "The " + myNoun + " was so " + myAdjective + " that we " + myVerb + " "  + myAdverb + ".";

Any tips? What am I missing?

Even the tips and solutions associated with this section give me the same errors.

Hey @miguelcangueiro!

Welcome to the forum!

I think you are making it more complicated than it needs to be.

The solution only needs to be one line. You don’t need to add extra words like " was so ".

You only need to use the 4 variable names and spaces in between. That’s it.

Hope that helps!

I already tried every combination and can’t make the tests pass. Even the solution found on the forum post about the exercise gives me the exact same error. How is that even possible?

Forum post: freeCodeCamp Challenge Guide: Word Blanks

I copied the solution exactly and it works for me. What error messages are you getting?

I get this error:

You should not directly use the values “dog”, “ran”, “big”, or “quickly” to create wordBlanks.

1 Like

Can I see your updated code?

My entire code:

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 + "."; // Only change this line;
// Only change code above this line

The code you have shared works on my end. Please ensure that you have disabled any extensions that interface with the freeCodeCamp website (such as Dark Mode and Ad Blocker), and set your browser zoom level to 100%. Both of these factors can cause tests to fail erroneously.

Also, if your browser isn’t updated that might be affecting the test. I don’t know what browser you are using right now but it is working for me on google chrome.

Tried in Firefox and the test indeed passed. I was using Chrome, and even with all the extensions disabled the test were failing.

Glad I could get this sorted. Thanks for the help.

1 Like

I already solved the issue by switching browsers. The exercise was giving errors on Chrome and working on Firefox with the same exact code. So there’s no issue with spaces.

I did this and it worked:


In my other prep course we are logging to Replit so I recalled the console.log , tried it and it worked.

It is great that you solved the challenge, but instead of posting your full working solution, it is best to stay focused on answering the original poster’s question(s) and help guide them with hints and suggestions to solve their own issues with the challenge.

My apologies! I’m very new. I will edit it down to suggestions :slight_smile: