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

about getter/setter #9078

Closed
CheaterScript opened this issue Oct 13, 2016 · 1 comment
Closed

about getter/setter #9078

CheaterScript opened this issue Oct 13, 2016 · 1 comment
Labels
invalid Issues and PRs that are invalid. question Issues that look for answers.

Comments

@CheaterScript
Copy link

CheaterScript commented Oct 13, 2016

Room.prototype.mainChannel = { get:function () { return this._mainChannel; }, set:function(value){ this._mainChannel = value; } }

it's working all right.but another not:

Player.prototype.user = { get:function () { return this._user; }, set:function (value) { this._user = value } }

Here is result when I print "player.user":
image

I don't konw why.Who can tell me why?Thank you!

@bnoordhuis
Copy link
Member

Please post this to https://github.com/nodejs/help/issues or some other channel, this issue tracker is not for general JS questions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid Issues and PRs that are invalid. question Issues that look for answers.
Projects
None yet
Development

No branches or pull requests

3 participants