function wordBlanks(myNoun, myAdjective, myVerb, myAdverb) {
// Your code below this line
var result = myNoun + " is " + myAdjective + " and " + myVerb + myAdverb;
// Your code above this line
return result;
}
// Change the words here to test your function
wordBlanks("dog", "big", "ran", "quickly");
wordBlanks("cat", "little", "hit", "slowly" );
wordBlanks("", "", "", "");
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:60.0) Gecko/20100101 Firefox/60.0.
I tried the code and used spaces in my own exercise but it still won’t accept.
It keeps saying:
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).
function wordBlanks(myNoun, myAdjective, myVerb, myAdverb) {
// Your code below this line
var result = "My " + myNoun + "is very " + myAdjective + "but " + myVerb + "away " + myAdverb;
// Your code above this line
return result;
}
// Change the words here to test your function
wordBlanks("dog", "big", "ran", "quickly");
wordBlanks("cat", "little", "hit", "slowly");
wordBlanks("monster", "giant", "smash", "fast");