Word Blanks Can't understand the error messages I am getting

Tell us what’s happening:

Hello people! :slight_smile:
I’m currently working on the Mad Libs assignment and I am really confused by it.
What I got so far is that I have to concatenate my variables into a string with some pre-determined text. But I’m doing something wrong because I keep getting these error messages, and I can’t understand what’s wrong.
“wordBlanks(“dog”, “big”, “ran”, “quickly”) should contain all of the passed in words separated by non-word characters (and any additional words in your madlib).”
“wordBlanks(“cat”, “little”, “hit”, “slowly”) should contain all of the passed in words separated by non-word characters (and any additional words in your madlib).”

Your code so far


function wordBlanks(myNoun, myAdjective, myVerb, myAdverb) {
  // Your code below this line
  var result = "";
  result = "I have a " + myNoun + " in my " + myAdjective + " house that I " + myVerb + " " + myAdverb + " every single day.";
  // 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) Ubuntu Chromium/68.0.3440.84 Chrome/68.0.3440.84 Safari/537.36.

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

Your code passes for me. Maybe it’s a browser thing?

Thank you for your quick response!
I tried again this way:
{
var result = “I have a " + myNoun + " in my " + myAdjective + " house that I " + myVerb + " " + myAdverb + " every single day.”;
}
and now I can pass the assignment just fine. Maybe it had something to do with my browser…
Thanks anyway!

1 Like