Created
August 31, 2017 03:14
-
-
Save tcase360/deb409b133e1595c6835be718ed4b6eb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment