Tell us what’s happening:
Describe your issue in detail here.
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 + ".";
console.log(wordBlanks);
// 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/118.0.0.0 Safari/537.36
Challenge: Basic JavaScript - Word Blanks
Link to the challenge:
felizseguraabdias:
+""+
This is an empty string, so it won’t put a space between the words. You need it to be a string with one space in it.
You are printing wordBlanks out to the console, so you should see in the console pane that there are no spaces between your words.
In the provided code, there is a problem with the concatenation of the variables in the wordBlanks string. There are missing spaces between the words, making the output unclear. Here’s the corrected code with added spaces:
const wordBlanks = "the " + myAdjective + " " + myNoun + " " + myVerb + " " + myAdverb + ".";
By adding spaces between the concatenated variables, the output will be more readable.