Skip to content

Instantly share code, notes, and snippets.

@ivanmalagon
Last active August 29, 2015 13:56
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 ivanmalagon/9078558 to your computer and use it in GitHub Desktop.
Save ivanmalagon/9078558 to your computer and use it in GitHub Desktop.
Create object in Javascript - As seen on 'The good parts'
if (typeof Object.create !== 'function') {
Object.create = function(o) {
var F = function() {};
F.prototype = o;
return new F();
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment