Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jonathanhawleypeters/a0bc2453c808d61930ee64bada39a943 to your computer and use it in GitHub Desktop.
Save jonathanhawleypeters/a0bc2453c808d61930ee64bada39a943 to your computer and use it in GitHub Desktop.
This is Why I Love Fat Arrow Functions in ES6 #2
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