JavaScript Object Prototype Inheritance
// FROM: http://tobyho.com/2010/11/22/javascript-constructors-and/
function Mammal(){
}
Mammal.prototype.breathe = function(){
// do some breathing
return "breathing...";
}
function Cat(){
}
Cat.prototype = new Mammal()
Cat.prototype.constructor = Cat
// now cat too can breathe!