Arrow Function Best Practice
When this is used in an arrow function, this will be the this value in the surrounding lexical scope. This specific feature of Arrow functions changes MANY things, so there are two best practices you need to know.
- Don’t create methods with arrow functions
- Create functions INISDE methods with arrow functions
Click here to read the article!
Enjoy!
Stay awesome,
Zell
P.S. This article is an excerpt from Learn JavaScript. Have a look if you found the article helpful!
P.P.S. Next batch of Enrollment for Learn JavaScript begins next Monday (6 July 2020)! I am SO EXCITED to help a new batch of students! 😄. Hope to see you in the course!