Hi friends help me to pass this test am finding it difficult

Tell us what’s happening:

Your code so far

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

// Only change code below this line
var wordBlanks = ("cat ", "litle ", "hit ","slowly "); // Change this line
// Only change code above this line

Your browser information:

User Agent is: Mozilla/5.0 (Linux; Android 8.1.0; itel A16 Plus) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Mobile Safari/537.36.

Challenge: Word Blanks

Link to the challenge:

do you understand what is the challenge asking?

Actually no I have try reading your comments to the other person an I understand but still not working this is how i understand using variables instead of their values

var wordBlank= "myNoun"  +  "bark"  +  "myAdjective  "  +  "and we all"  +   "ran  "  +  "to our houses"  +  quickly  "  +  "and fast"  + ".";
//This is how I understood it but not working.

You need to use the variables, and you write variables without quotes around

I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (’).

Hey @ychris!

Here are some additional resources to help you understand variables a little bit better because they play an important role in programming.

Start watching at the 11:15 mark

In the example, you see the variable sentence is assigned a string comprised of multiple strings separated by the + operator. The + operator allows you to concatenate strings.

In the editor code, there are 4 variables initialized with values. Those variables are just strings, so you can combine them in a similar manner as if they were strings like “dog” or “big”.

1 Like
</>code below  </>
//could this be what your talking about .
var   wordBlanks="myNoun " + "myAdjective " + "myVerb"  +  "myadverb" " .";

Here am using variables and + to concatenate the variable. Instead of the values of the variables am my right. …

The problem is you are not concatenating any variables. You are just concatenating the literal strings "myNoun ", "myAdjective ", “myVerb”, and “myadverb”.

Make sure you understand the difference between a variable representing a string and a literal string.


Also you will need to account for spaces or else the result will be one giant word instead of a sentence of words.

1 Like