Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Q121- explanation is wrong #790

Open
flyskywhy opened this issue Jun 7, 2024 · 2 comments
Open

Q121- explanation is wrong #790

flyskywhy opened this issue Jun 7, 2024 · 2 comments

Comments

@flyskywhy
Copy link

The answer is not When calling a setter method, undefined gets returned, but just there is no getter in config e.g.

get language() {return 'foobar'},
@Asilkan5807
Copy link

The answer is not When calling a setter method, undefined gets returned, but just there is no getter in config e.g.

get language() {return 'foobar'},

@alexandercerutti
Copy link

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants