Skip to content

Instantly share code, notes, and snippets.

@scottcorgan
Created May 22, 2012 19:52
Show Gist options
  • Save scottcorgan/2771245 to your computer and use it in GitHub Desktop.
Save scottcorgan/2771245 to your computer and use it in GitHub Desktop.
Highly Optimized Javascript Constructor
var Parent = (function() {
var Parent = {},
parentPrototype = {
func1: function(){}
};
Parent.create = function() {
var par = Object.create(parentPrototype);
return par
};
return Parent;
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment