r/javascript • • Jul 10 '16

The JavaScript language reboot is done

https://medium.com/@velmu/the-javascript-language-reboot-is-done-7bcec4be2cb6#.dy2fyy9j1
41 Upvotes

98 comments sorted by

View all comments

Show parent comments

0

u/[deleted] Jul 10 '16

[deleted]

1

u/[deleted] Jul 10 '16

Yeah, despite working with arrow functions for nearly a year, I still find them infinitely more difficult to understand and comprehend than the non-arrow version. The syntax is just so poor.

1

u/SuperFLEB Jul 10 '16

The place I find it more readable is in functions like map, where something like...

arr.map(thing => thing * 1000);

reads as "map thing to thing * 1000". I do agree that it can be less immediately readable or intuitive in other cases like object methods or general-use callbacks, for instance.

0

u/Asmor Jul 10 '16

And that's super handy for some common transformations, like picking values of an object:

Object.keys(obj).map(key => obj[key])