Skip to content

Instantly share code, notes, and snippets.

View benpriebe's full-sized avatar

Ben benpriebe

  • Brisbane, Australia
View GitHub Profile
@benpriebe
benpriebe / js-inheritance.md
Created December 6, 2012 01:39
JS Inheritance styles

#Inheritance Styles

Here are a few different ways to try and implement prototypal inheritance in a classical way. In these examples, we try to derive a more specific class of the base class - Asset.

By inspecting the web development tools console output in Chrome you can see the prototype chain and view the differences of each approach.

<html>
	<body>