this.coffee = false;
function Employee1(coffee) {
this.coffee = coffee;
const enterOffice = () => {
if(this.coffee) {
console.log('good morning!');
} else {
console.log('this sucks');
}
}
return {
enterOffice: enterOffice
}
}
const heather1 = new Employee1(true);
heather1.enterOffice(); // good morning!