How to console.log a function

I wonder why when I put `function wordBlanks(myNoun, myAdjective, myVerb, myAdverb) {

var result = "The " + " " + myAdjective + " " + myNoun + " " + myVerb + " " + myAdverb + “.”;

return result;

wordBlanks(“dog”, “big”, “ran”, “quickly”);


the console does not print out “The big dog ran quickly.”

Because the call to wordBlanks in console.log(wordBlanks()); doesn’t have the arguments “dog”, “big”, “ran”, and “quickly”.


@ArielLeslie thank you for that clarification. I still wonder how to put that right though could you help me with that?

create a variable and store the function in that variable. then console.log the variable

1 Like

put 4 strings in the parenthesis

console.log(wordBlanks("noun", "adjective", "verb", "adverb"));

or inside the function add console.log(result) before the return result line