Why do I need to call the function vs logging it?

Hey everyone! I’m a bit confused, why do I need to call a function right before logging the result to the console:

const plantNeedsWater = function(day) {
  if(day === 'Wednesday') {
    return true;
  } else {
    return false;
  }
}
plantNeedsWater('Wednesday'); // here
console.log(plantNeedsWater('Wednesday'))

If I omit that step I will get the same result in the console as well. It seems that only the last value of the argument, which we have passed in here “console.log(plantNeedsWater(‘Wednesday’))”, matters. For example, if I assinged any other value there in the console.log step - I would get ‘false’, no matter what value we have assinged to the argument before. Thank you in advance.

6 Likes