Created
March 17, 2015 23:49
-
-
Save hershmire/e98949e905e4d08ae8f0 to your computer and use it in GitHub Desktop.
Function object example from Douglas Crawford without prototypical inheritance and the need for `this` for better security. https://www.youtube.com/watch?v=bo36MrBfTk4&t=2143
This file contains 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
function constructor(spec) { | |
var that = other_constructor(spec), | |
member, | |
method = function() { | |
// spec, member, method | |
}; | |
that.method = method; | |
return that; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment