Console.log(Functions)

Why does it log this output to the console?

It needs to be

console.log(plantNeedsWater())

As its a function :slight_smile:

I get it oops ha. I could also put console.log(plantNeedsWater(“Wednesday”)); to override the Tuesday value.

Are functions types of methods?

no? Those are two separate function calls, one doesn’t override the other. But you do not log the returned result of the first function call, thus nothing is shown in the console

no, .log() is a method of the console object for example. while plantNeedsWater is a function

1 Like

oh I get it; that’s why functions are so useful, they can be called multiple times.
Thanks so much for your help!