OOP with JS and a Honda Civic

No, not JSOOP, just a demo for some FEDs on how prototype chaining works in JS using my car as an example.

by psyon001

HTML

<button id="start-car">Start the Engine</button>
<div id="car-info"></div>

JavaScript

/** Define the most base class possible, in this case an Automobile which simply has the property of having a minimum of 1 wheel and an engine of some sort. */
Automobile = {
    wheels:1,
    engine:""
};

/** Car is an Automobile, override the number of wheels but keep the same prototype chain. */
var Car = function (){
    this.wheels = 4;
    this.engine = "4-cylinder";
};
Car.prototype = Automobile;
/** @returns {String} "Car" */
Car.prototype.toString = function (){
    return "Car";
};
/** For fun, a start method. */
Car.prototype.start = function (){
    alert("revving "+this.engine+" engine");
};

/** Motorcycle is an automobile, override the number of wheels but keep the same prototype chain. */
var Motorcycle = function (){
    this.wheels = 2;
    this.engine = "Shovelhead";
};
Motorcycle.prototype = Automobile;
/** @returns {String} "Motorcycle" */
Motorcycle.prototype.toString = function (){
    return "Motorcycle";
};
/** For fun, a start method. */
Motorcycle.prototype.start = function (){
    alert("kickstarting "+this.engine+" engine");
};

/** For Jim, let's define a Harley */
var HarleyDavidson = function (){
    this.engine = "Shovelhead";
};
/** Harley is a Motorcycle. */
HarleyDavidson.prototype = new Motorcycle();
/** @returns {String} "One bad-ass piece of American steel" */
HarleyDavidson.prototype.toString = function (){
    return "One bad-ass piece of American steel";
};
/** Override the start method to something proper. */
HarleyDavidson.prototype.start = function (){
    alert("Man, that's loud!");
};

/** A Coupe is a Car which is an Automobile, and has a specific number of doors. */
var Coupe = function (){
    this.doors = 2;
};
/** A Coupe is a Car */
Coupe.prototype = new Car();
/** @returns {String} "Coupe" */
Coupe.prototype.toString = function (){
    return "Coupe";
};

/* A Sedan is also a Car which is an Automobile, and has a specific number of doors which is different from a Coupe. */
var Sedan = function (){
   ...