The ability to reply to discussions is limited to PRO members. Want to join in the discussion? Click here to subscribe now.

Arrow Function => in ES6

Arrow Function => in ES6

2:57
ECMAscript 6 introduces the "arrow function" as a shortcut for creating anonymous functions with `this` scope bound.
Watch this lesson now
Avatar
egghead.io

ECMAscript 6 introduces the "arrow function" as a shortcut for creating anonymous functions with this scope bound.

Avatar
Michael

In the second example where you show that 'this' references the outer scope, what if you needed to access this.handleMessage inside of that function?

Avatar
James

It's a tall order, but if you could find ways to narrate the video above without using "this" as a demonstrative, and only as a JS keyword, then it would be a lot easier to take in. So when highlighting something, refer to "the highlighted section" instead of "this".

I appreciate this is easier said than done. ...dammit.

HEY, QUICK QUESTION!
Joel's Head
Why are we asking?