JSFiddle - React, Tailwind, and code Playground

JavaScript

// clear console each time
console.clear();

// Creating smartphone "class"
var Smartphone = function () {
  this.bootup();
}
Smartphone.prototype = {
  bootup: function() {
    console.log('booting...');
  },
  makeCall: function() {
    console.log('making call...');
  }
};

// Legit iPhone, made by Apple
var iPhone = function () {
  Smartphone.apply(this, arguments);
}
iPhone.prototype = Object.create(Smartphone.prototype);
// Can make Wifi calls
iPhone.prototype.makeWifiCall = function() {
  console.info('making wifi call...');
}

// Fake iPhone, made in ????
var iPhoney = function () {
  Smartphone.apply(this, arguments);
}
iPhoney.prototype = Object.create(Smartphone.prototype);

// Start creating instances!


debugger;