wordBlanks Challenge not Passing in FCC, Passes in Console

wordBlanks Challenge not Passing in FCC, Passes in Console


My Code is below. It doesn’t pass in FCC, but I get the correct sentence in Chrome console. Why does the test area talk about Cats, when my noun is defined as dog??

function wordBlanks(myNoun, myAdjective, myVerb, myAdverb) {
// Your code below this line

var myNoun = “dog”;
var myAdjective = “big”;
var myVerb = “ran”;
var myAdverb = “quickly”;

var result = "The " + myNoun + " was " + myAdjective + ", but he " + myVerb + " " + myAdverb + “!”;

// Your code above this line
return result;

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

Console sentence:

“The dog was big, but he ran quickly!”


Here is the test info:

// running tests
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).
// tests completed


Why are you hardcoding these values in? You should be using the arguments passed into the function and not other variable names which are always assigned the same values. You are failing the 3rd test, because your function returns “The dog was big but he ran quickly!” for any call you make to the function.