Hi,
I understand why all of these answers would print the correct value. What I don’t understand is why answer 2 wouldn’t. Can someone explain the reasoning behind this?
Thank you so much!
Hi,
I understand why all of these answers would print the correct value. What I don’t understand is why answer 2 wouldn’t. Can someone explain the reasoning behind this?
Thank you so much!
.num
is a getter, so you’d use it like you would use a variable:
let x = tempObj.num;
but you would not use it like a function
let x = tempObj.num();
would not work
thank you this makes sense!
This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.