Skip to content

Instantly share code, notes, and snippets.

@devongovett
Created February 9, 2012 00:47
Show Gist options
  • Save devongovett/1776016 to your computer and use it in GitHub Desktop.
Save devongovett/1776016 to your computer and use it in GitHub Desktop.
function Bar() {
console.log("Bar");
}
Bar.prototype.baz = function() {
console.log("baz");
}
function Foo() {
console.log("hi");
}
Foo.prototype = Object.create(Bar.prototype);
var instance = new Foo();
instance.baz();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment