Skip to content

Instantly share code, notes, and snippets.

@machty
Created February 24, 2013 01:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save machty/5022223 to your computer and use it in GitHub Desktop.
Save machty/5022223 to your computer and use it in GitHub Desktop.
Thing = (function() {
var Thing = function() {
// this.whatever = asd
}
Thing.prototype.doIt = function() {
// Call function that no one has access to.
privateDoIt();
}
function privateDoIt() {
// No one can override this function.
}
return Thing;
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment