Last active
August 31, 2017 03:12
-
-
Save tcase360/d2165bc6886bb4257d93509452ce584b to your computer and use it in GitHub Desktop.
Example for this
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 Employee(coffee) { | |
this.coffee = coffee; | |
const enterOffice = function() { | |
if(this.coffee) { | |
console.log('good morning!'); | |
} else { | |
console.log('this sucks'); | |
} | |
} | |
return { | |
enterOffice: enterOffice | |
} | |
} | |
const heather = new Employee(true); | |
heather.enterOffice(); // this sucks |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment