Skip to content

Instantly share code, notes, and snippets.

@syshen
Created June 27, 2012 06:16
Show Gist options
  • Select an option

  • Save syshen/3001878 to your computer and use it in GitHub Desktop.

Select an option

Save syshen/3001878 to your computer and use it in GitHub Desktop.
function parent() {
this.print = function() {};
this.hello = function() {};
}
function child() {
}
parent.call(child.prototype);
var c = new child();
c.print();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment