Word Blanks helps

Word Blanks helps
0.0 0

#1

Tell us what’s happening:

please help

Your code so far


function wordBlanks(myNoun, myAdjective, myVerb, myAdverb) {
  // Your code below this line
  var result = "a big" + "dog" + "but" + "ran" + "very" + "quickly";

  // Your code above this line
  return result;
}

// Change the words here to test your function
wordBlanks("dog", "big", "ran", "quickly");

Your browser information:

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

Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/word-blanks


#2

You do not have any spaces between some of your words, plus you are not using the four arguments (myNoun, myAdjective, myVerb, myAdverb) to create your sentence. Instead, your function will return the same sentence no matter what values are passed to the function. You need to rewrite the function so that it uses the four arguments (variables) as part of the sentence.


#3

var result = “my” + “big” + “dog” + “ran” + “quickly” + “, and it” + “hit” + “a” + “little” + “cat” + “slowly.”;

I have rewritten the code as your advice, but it still was wrong. please help


#4

Remember: use the four arguments (myNoun, myAdjective, myVerb, myAdverb) and assign it to your var result.

Don’t just follow this sample code:

var sentence = "It was really" + "hot" + ", and we" + "laughed" + "ourselves" + "silly.";

If you really got stuck and missed it:

var result = "my " + myAdjective + " " + myNoun + " " + myVerb + " " + myAdverb + “, and it hit am little cat slowly.”;


#5

Space is a string you need to add yourself into your code as + doesn’t add spaces. It is a concatenation operator only.

Also you need to revise what a variable is. Right now your var result is just a hard-coded string that looks like this:

mybigdogranquickly, and ithitalittlecatslowly.

Refer back to the advice of @randeldawson .

We’ll help if you get stuck again but pls read more carefully.