summaryrefslogtreecommitdiff
path: root/graphs/js/myCompany/employee.js
blob: 5489dd7d712b56d5ed3654689151a48664916733 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
class Employee {
    constructor(name) {
        this.name = name;
    }
    getName() {
        return this.name;
    }
    fire(target) {
        if (target instanceof Employee) {
            console.log("I am an employee, I cannot fire someone!");
        } else {
            console.log("I cannot fire that!");
        }

        return false;
    }
}

module.exports = {
    Employee,
};