JSFiddle - React, Tailwind, and code Playground
by Ryan Morris
JavaScript
var Vehicle = function(color) {
this.color = color;
}
Vehicle.prototype.tires = 4;
var smallVehicle = new Vehicle("blue");
var Car = function(color) {
//this.color = color;
Vehicle.call(this, color);
}
Car.prototype = new Vehicle();
Car.prototype.cupHolders = 2;
var toyota = new Car("red");
console.dir(toyota);
console.dir(smallVehicle);