Stuck on Word Blanks

Stuck on Word Blanks
0

#1

Hi.

I’m not sure what I’m supposed to do. I changed the words but that didn’t work.

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


#2

Can you share your code so that we can help you?


#3
function wordBlanks(myNoun, myAdjective, myVerb, myAdverb) {
  // Your code below this line
  var result = "";

  // Your code above this line
  return result;
}

// Change the words here to test your function
wordBlanks("cat", "little", "hit", "slowly");

#4

@SeanFl42 I agree, this might be a bit misleading.
What this asks you to do is to form a sensical sentence from the options given in wordBlanks();

For example, I was given:
wordBlanks(“dog”, “big”, “ran”, “quickly”);

Now I can construct the sentence “The dog was really big and ran off quickly” by concatenation in var result:

var result = "The " + myNoun + " was really " + myAdjective + " and " + myVerb + " off " + myAdverb;

I hope this helps?


#5

It’s a big help.

Thank you. :slight_smile: