Skip to content

Instantly share code, notes, and snippets.

@punneng
Created August 3, 2012 08:24
Show Gist options
  • Select an option

  • Save punneng/3245814 to your computer and use it in GitHub Desktop.

Select an option

Save punneng/3245814 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;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment