Javascript Mad Libs word Blanks Challenge

Tell us what’s happening:
Kindly take a peep at the below link challenge. It’s a mad libs challenge on Javascript. I am missing out somewhere and I can’t figure out.
Thank in advance!

Your code so far


function wordBlanks(myNoun, myAdjective, myVerb, myAdverb) {
  // Your code below this line
  var result = "The" + "dog" + " was so" + "big" + " and it" + "ran" + "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 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.100 Safari/537.36.

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

You are not using any of the function parameters,
so it doesn’t matter which argument the function has, you will always print the same string;

wordBlanks("Batman", "Robin", "Alfred", "Joker"); // 'Thedog was sobig and itranquickly.'
wordBlanks("Yes", "No", "Maybe", "Whatever"); // 'Thedog was sobig and itranquickly.'

Also you might want to add some spaces between words, since as it is is not nicely formatted

'Thedog was sobig and itranquickly.'

Hope this helps

1 Like