Skip to content

Instantly share code, notes, and snippets.

@wiennat
Forked from punneng/ExampleOfPrivateMemberDeclaring.js
Created August 3, 2012 08:29
Show Gist options
  • Select an option

  • Save wiennat/3245851 to your computer and use it in GitHub Desktop.

Select an option

Save wiennat/3245851 to your computer and use it in GitHub Desktop.
How to declare private properties/methods
function myPowerConstructor(x) {
var that = otherMaker(x);
var secret = f(x);
that.priv = function () {
... secret x that ...
};
return that;
}
@wiennat
Copy link
Copy Markdown
Author

wiennat commented Aug 3, 2012

หมายถึง private เหรอครับ

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