Skip to content

Instantly share code, notes, and snippets.

@shrunyan
Created April 28, 2015 17:51
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 shrunyan/7b92d68c621faa8e5265 to your computer and use it in GitHub Desktop.
Save shrunyan/7b92d68c621faa8e5265 to your computer and use it in GitHub Desktop.
Experimenting with factories in javascript
var proto = {
test: "test"
};
var Factory = function (proto) {
return Object.create(proto);
};
var instance = Factory(proto);
console.log(instance);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment