Skip to content

Instantly share code, notes, and snippets.

@phillipalexander
Created August 15, 2013 04:43
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 phillipalexander/6238317 to your computer and use it in GitHub Desktop.
Save phillipalexander/6238317 to your computer and use it in GitHub Desktop.
ObjectCreationN8Nstyle.js
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