How to view the output of the code in exercises?

Actually i put this in the last line:

console.log (wordBlanks)

Just post your code I think it’s easier to just give you the code.

function wordBlanks(myNoun, myAdjective, myVerb, myAdverb) {
  // Your code below this line
  var result = "";
  result = "I saw a " + myAdjective + " " + myNoun + "that " + myVerb + " " + myAdverb; 

  // Your code above this line
  return result;
}

// Change the words here to test your function
wordBlanks("dog", "big", "ran", "quickly");
console.log (wordBlanks)
function wordBlanks(myNoun, myAdjective, myVerb, myAdverb) {
  var result = "";
  result = "I saw a " + myAdjective + " " + myNoun + "that " + myVerb + " " + myAdverb; 

  return result;
}

// If you want the output with input 'a', 'b', 'c', 'd'
console.log( wordBlanks('a', 'b', 'c', 'd') )

// If you want the output with input 'aa', ''bb', 'cc', 'dd'
console.log( wordBlanks('aa', 'bb', 'cc', 'dd') )

That gives this output in the console tab:

I saw a big dogthat ran quickly
word-blanks:26:3
I saw a little catthat hit slowly word-blanks:26:3
I saw a that word-blanks:26:3
[Show/hide message details.] Error: e is undefined

This is my last line:

console.log(wordBlanks(“dog”, “big”, “ran”, “quickly”));

Yeah i fixed it. Passed.

I saw a big dogthat ran quickly

That’s your output. You’ve observed the output case closed.

Thanks a lot for helping me. Really appreciate :blush:

sorry for the newbie questions. I have just started my programming journey.

1 Like