JSFiddle - React, Tailwind, and code Playground
by kazabr
JavaScript
function car(plate, model, color){
this.plate = plate || "missing";
this.model = model || "uncknown";
this.color = color || "uncknown";
}
function carsInLot(plate, model, color, timeIn, spaceNum){
this.timeIn = timeIn;
this.spaceNum = spaceNum;
this.carInfo = car;
this.carInfo(plate, model, color);
}
carsInLot.prototype = new car();
var car1 = new carsInLot("213ABC", "Ford", "blue", "10:02AM", "32");
car.prototype.companyOwned = true;
console.log(car1.carInfo());