DEV Community


Discussion on: ES6, the arrow function

jsnanigans profile image
Brendan Mullins

The arrow function is one of my favorite new additions to JavaScript, I think it's most useful to keep the scope of this consistent.

It also makes it really easy to make small functions

let a = {
  isMonday: _ => new Date(this.value).getDay() === 1

Also if you are into functional programming, the arrow functions is the best thing to ever happen to javascript

damcosset profile image
Damien Cosset Author

Yes, I also love how it removes a lot of this pain!