JSFiddle - React, Tailwind, and code Playground
JavaScript
var Vehicle = function() {
var age = 21; //private variable
this.setAge = function(age2) {age = age2;};
this.getAge = function() {return age;};
};
var Plane = function(){
Vehicle.apply(this, arguments);
};
Plane.prototype = Object.create(Vehicle.prototype);
var plane = new Plane();
console.log( plane instanceof Vehicle , plane.getAge());