Basic JavaScript - Word Blanks

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 = "Any , " + "myNoun " + "that is 90% " + "myAdjective " + "and , " +  "myVerb " + "very / " + "myAdverb " + "is good !"; // Change this line
// Only change code above this line

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/118.0

Challenge: Basic JavaScript - Word Blanks

Link to the challenge:

If you put console.log(wordBlanks) below this line of code, you’ll see that it prints the following to the console:
“Any , myNoun that is 90% myAdjective and , myVerb very / myAdverb is good !”

This is because you have simply concatenated a series of strings together. If you want to include variables in your string, you should add the variable names without quote marks.

EXAMPLE:

let yourName = "kelia";
let yourGreeting = "Hello, my name is " + yourName + "!";
console.log(yourGreeting); // "Hello, my name is kelia!"
2 Likes

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