Sitelet https://github.com/nodejs/node/issues/9078
Skip to content

about getter/setter #9078

Description

@CheaterScript

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!

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    invalidIssues and PRs that are invalid.questionIssues asking questions about Node.js.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions