JSFiddle - React, Tailwind, and code Playground

by Ryan Morris

HTML

<div id="container">
    
    <h1>Hello, manage your employees</h1>
    
    
    
</div>

JavaScript

function Employee () {
  this.name = "";
  this.dept = "general";
}

function Manager () {
  this.reports = [];
}
Manager.prototype = new Employee;

function WorkerBee () {
  this.projects = [];
}
WorkerBee.prototype = new Employee;

function SalesPerson () {
   this.dept = "sales";
   this.quota = 100;
}
SalesPerson.prototype = new WorkerBee;

function Engineer () {
   this.dept = "engineering";
   this.machine = "";
}
Engineer.prototype = new WorkerBee;


// 

var jim = new Engineer;
console.log(jim);

var sally = new Engineer;
console.log(sally);

Engineer.prototype.is_awesome = true;

console.log(jim);
console.log(jim.is_awesome);