Skip to content

Instantly share code, notes, and snippets.

@arozwalak
Last active March 9, 2017 22:10
Show Gist options
  • Save arozwalak/7037997 to your computer and use it in GitHub Desktop.
Save arozwalak/7037997 to your computer and use it in GitHub Desktop.
Javascript: Private parameters
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