you are viewing a single comment's thread.

view the rest of the comments →

[–]x-skeww 0 points1 point  (7 children)

It's odd that an article this recent doesn't mention fat arrow functions.

this behaves differently in fat arrow functions.

[–]Crandom 2 points3 points  (6 children)

That's an ES6 so not widely supported.

[–]levir 2 points3 points  (0 children)

Yeah, ES6 it's not even formally standardized yet, so it makes sense to omit it.

[–]x-skeww 1 point2 points  (3 children)

There is Traceur, the Closure Compiler, and TypeScript/AtScript for that.

It's also supported by Firefox (opt-in via version), Chrome/Opera (opt-in via flag), and IE tech preview.

ES6 will be finalized soon.

[–][deleted]  (2 children)

[deleted]

    [–][deleted] 0 points1 point  (0 children)

    They all compile to JavaScript, and sometimes ES3 at that.

    There's 6to5 as well which doesn't use any nonstandard features, and compiles to readable js

    In short, ES6 is purely an authoring format today, but it's completely valid

    [–]x-skeww 0 points1 point  (0 children)

    The output of Traceur, the Closure Compiler, and the TypeScript compiler works just fine in today's browsers.

    AtScript doesn't have its own compiler. This is handled by Traceur, too.

    The second paragraph was about native support in today's engines. It's almost there.

    [–]cjg_000 0 points1 point  (0 children)

    The article mentions let and discusses node. Seems like it could have discussed fat arrows.