You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@flyskywhy I think your explanation is correct, but goes beyond the purpose of the question!
In fact, the question is asking "what happens if a property, which owns just a setter but not a getter, get's invoked"?
And you are right, but that's beyond. A setter is different from a getter and not defining a getter will inhevitably lead to undefined when a property is read.
So the answer is correct and the explanation is correct too.
The answer is not
When calling a setter method, undefined gets returned
, but just there is nogetter
inconfig
e.g.The text was updated successfully, but these errors were encountered: