Please help with wordblanks

Tell us what’s happening:
Describe your issue in detail here.

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" + ".";




Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.164 Safari/537.36

Challenge: Word Blanks

Link to the challenge:

Hi @siba45 !

A couple of issues.

No.1:
These are not supposed to be strings.

You are supposed to use the variable names of myNoun, myAdjective, etc.

No.2:
Once you fix that, you need to add a console.log(wordBlanks) at the end of your code so you can see what is actually being printed.

You will notice that there are spacing issues in your sentence.

Hope that helps!

hello! how do i put them ?

Maybe showing you an example might help with the understanding of the concept :grinning:

So the task wants you to create a sentence using the variable names they provided for you.

Here is an example I made up to show what you need to do in the challenge.

var firstName = "Jessica"
var lastName = "Wilkins"

var sentence = firstName + " "  + lastName + " " + "is awesome."
console.log(sentence) // Jessica Wilkins is awesome.

Notice how I am using the variable names (firstName & lastName) in the sentence instead of “Jessica” and “Wilkins”

The cool thing about variables is that you can assign data to them and then reference those variable names later on.

You will follow that same structure in my example except you will use the variables they gave you to create a sentence.

Make sense?

eish! this thing is giving me problems i did the exact thing using what they gave me but No!

What’s your current code?

var wordBlanks = The + " " + myAdjective + " " + myAdverb + " " + myVerb + " " + "myAverb.";
console.log(wordblanks)

It is getting better.

You should be getting messages in the console.

The first one is this.

You need to keep reading the error messages to clean up your code.

1 Like

Did you fix the The issue? I see a few others.

  1. Check your variable names, spelling matters.
  2. Check which part of speech you’re missing.
  3. Quotes around strings, but not around variable names.
2 Likes

You have a total of two issues with the latest code you posted here

Also, it should be console.log(wordBlanks)

The reason why I suggested using console.log to help find and fix those errors is because you will need that skill for the upcoming javascript sections.

If you learn how to read error messages now, then it will help out a lot more when you get to the harder javascript sections later.

2 Likes

Well, the noun is also missing lol

2 Likes

What’s the most recent version of your code now?

1 Like