Functions in ES6

Axel Rauschmayer axel at
Mon Mar 25 00:28:37 PDT 2013

A rough guide for migrating functions from ES5 to ES6 would be:

1. Function declarations --> function declarations
2. Function expressions --> arrow functions
3. IIFEs -->  blocks
4. Functions in object literals --> concise method syntax
5. Constructors --> classes
6. New: generator functions

These rules are easy to understand, with one exception: You can’t have a function declaration with lexical |this| (that is, #1 is a potential source of confusion).

Have there been ideas for this? I’m thinking arrow function declarations (but without syntactic expression-versus-declaration ambiguity).


Dr. Axel Rauschmayer
axel at


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list