Skip to content

Instantly share code, notes, and snippets.

@lucian303
Created May 17, 2013 08:54
Show Gist options
  • Save lucian303/5597850 to your computer and use it in GitHub Desktop.
Save lucian303/5597850 to your computer and use it in GitHub Desktop.
prototypical inheritance in js
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