Created
April 28, 2015 17:51
-
-
Save shrunyan/7b92d68c621faa8e5265 to your computer and use it in GitHub Desktop.
Experimenting with factories in javascript
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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