We're a place where coders share, stay up-to-date and grow their careers.
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.
this
It also makes it really easy to make small functions
let a = { value: Date.now(), 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
Yes, I also love how it removes a lot of this pain!
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
Also if you are into functional programming, the arrow functions is the best thing to ever happen to javascript
Yes, I also love how it removes a lot of this pain!