Created
August 15, 2013 04:43
-
-
Save phillipalexander/6238317 to your computer and use it in GitHub Desktop.
ObjectCreationN8Nstyle.js
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
var Stack = function() { | |
return Object.create(Stack.prototype, { | |
_storage: { value: [], writable: false, configurable: false } | |
}); | |
}; | |
Stack.prototype = Object.create(null); | |
Stack.prototype.add = function(element) { | |
// ... | |
}; | |
var stack = Stack(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment