Skip to content

Instantly share code, notes, and snippets.

@tobiastom
Created June 18, 2013 08:31
Show Gist options
  • Select an option

  • Save tobiastom/5803621 to your computer and use it in GitHub Desktop.

Select an option

Save tobiastom/5803621 to your computer and use it in GitHub Desktop.
var haustier = function( name ) {
this.name = name;
};
haustier.prototype.toString = function() {
return this.name;
};
var hund = function( name ) {
this.name = name;
};
hund.prototype = haustier.prototype;
var bello = new hund( 'bello' );
console.log( 'hallo ' + bello );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment