Skip to content

Instantly share code, notes, and snippets.

@nola
Created January 31, 2014 00:41
Show Gist options
  • Select an option

  • Save nola/8723259 to your computer and use it in GitHub Desktop.

Select an option

Save nola/8723259 to your computer and use it in GitHub Desktop.
Objects parent > child > grandchild constructor
var parent = {
get: function fn(){
return this.val;
},
val:42
}
var child = Object.create(parent);
child.val = 3.14;
var grandchild = Object.create(child);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment