When to use parenthesis?

Hi guys, I got a quick question for you.

In an exercise I was told to write the value of a property which is a function without parenthesis this way (line15):

image

Now in another exercise, Iā€™m told to write the value of a property with parenthesis which is also a function, this way (line 46):

image

So my question is when should I use parenthesis and when not, when It comes to writing a function as a value of a property ?

Thank you !!! :smiley:

{this.talk}

is an expression of the talk property.

{this.isLight()}

is an expression of the return value of the isLight() method.

States ARE values, whereas methods RETURN values.

1 Like