Basic JavaScript - Word Blanks

Tell us what’s happening:
Describe your issue in detail here.
Pls i need help here, this is my code, i do not understand whar thw want from me i n the remaining two tests

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 Fat " + "dog" + "chased the " + "big" + "cat, and it " + "ran" + "so " + "quickly. "; // 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/104.0.0.0 Safari/537.36

Challenge: Basic JavaScript - Word Blanks

Link to the challenge:

Hey!
this exercise is supposed to teach you about the use of string variables and how you can combine string variables that contain short strings to form whole sentences.

for example:

let myName = "taran"

let greeting = "My name is " + myName + ".";

here i’ve used the variable myName instead of the literal string “taran” to form my answer and in the same way you’re supposed to create this string by using the variables that have been provided to you.

Hope this helps! :smile:

I’m sorry, but i did’nt fully understand you, there is no myName in my code

it was just an example, you’re expected to use the variables that are provided to you.

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

Okay, do you mean instead of writing, for instance “big”, i shld write “myAdjective” ?

I think i have Tried that and it worked to some extent, now the final step refuse to pass, i dont really understand it, this one.

wordBlanks should contain all of the words assigned to the variables myNoun , myVerb , myAdjective and myAdverb separated by non-word characters (and any additional words of your choice).

It basically translates to “create any sentence of your choice by using all of the variables provided to you but they need to have some strings in between them.”

for example, this seems to run for me.

<REDACTED>
1 Like

see what i did now, but it’s not still running

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

// Only change code below this line
const wordBlanks = "The Fat " + myNoun + "chased the " + myAdjective + "cat, and it " + myVerb + "so " + myAdverb + "."; // Change this line
// Only change code above this line

Alright, Thanks a million :pray: :pray:

1 Like

Hey @staranbeer , 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.

We are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting full working solutions.

1 Like