Skip to content

Instantly share code, notes, and snippets.

@Nek

Nek/Object.create.js

Created Dec 17, 2014
Embed
What would you like to do?
#js #polyfill
// http://stackoverflow.com/a/10142212/195895
if (typeof Object.create !== 'function') {
Object.create = function (o) {
function F() {}
F.prototype = o;
return new F();
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.