JSFiddle - React, Tailwind, and code Playground

by Tim Morgan

HTML

<div class = "exp"><h1>Checkpoint Exercise</h1></div>

CSS

h1{
    font-size:15px;
    color:#00f;
    text-decoration: underline;
    -webkit-transition-duration: 0.2s;
}

JavaScript

/* Creat an Employee and Student class. Run greetAtGBC() against each of the classes. Your classes should have a constructor that takes a name */

function greetAtGBC(person) {
    console.log("Hello " + person.name + "!");
    if( person instanceof Employee ){
        console.log("Your mailroom is at A4-123");
    }else if( person instanceof Student ){
        console.log("How are your studies progressing?");
    }
}

function Employee(){
    this.name = name;
}

function Student(){
    this.name = name;}
var me = new Employee("Dumm Eee");
var student = new Student("Stu Dent");
greetAtGBC(me);
greetAtGBC(student);