Skip to content

Instantly share code, notes, and snippets.

@imbcmdth
Created June 20, 2012 18:50
Show Gist options
  • Save imbcmdth/2961527 to your computer and use it in GitHub Desktop.
Save imbcmdth/2961527 to your computer and use it in GitHub Desktop.
var parent = {a:2, b:33};
var ChildMaker = function(){};
ChildMaker.prototype = parent;
var child = new ChildMaker();
parent.c = 2;
child.c; // 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment