Open shamansir opened 9 years ago
Also code would be more compact with =>
from ES7. Not yet sure I want to use Babel, though.
That arrow functions syntax is ES6 and works in the latest Chrome and Safari.
@Nek cool, you are right, thanks. And forEach
is ES5, actually :)
That's regarding =>
:
But I plan to try Babel at some point anyway, I'm just uncertain if I like it as a result :).
I already use it and I have to say ES6 is ages ahead of ES5.
Please take a quick look at this document to get a feel of it https://github.com/airbnb/javascript/blob/master/README.md
Also babel can be used as a standalone tool. That's neat 'cause setting up a toolchain is the most cumbersome part of todays JS development.
Also there are usages of both Object.keys()
-based loops and for-in
-based loops, I should chose the one true way.
While using reactive techniques, I forgot all modern browsers support
forEach
/map
/reduce
and stuff. Should change for-loops to this hipsterish stuff too.