Skip to content

Instantly share code, notes, and snippets.

@machty
Created February 24, 2013 01:41
Show Gist options
  • Select an option

  • Save machty/5022223 to your computer and use it in GitHub Desktop.

Select an option

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