Created
July 1, 2017 00:28
-
-
Save jonathanhawleypeters/a0bc2453c808d61930ee64bada39a943 to your computer and use it in GitHub Desktop.
This is Why I Love Fat Arrow Functions in ES6 #2
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
Cat.prototype.readCollar = () => { | |
console.log(this.name); | |
//undefined at call time, 'this' is bound to the global scope | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment