Trouble fully grasping arrow functions

I just finished the ES6 challenges of the JavaScript section. I barely made it through and still feel like I don’t quite understand some of it. Specifically, the challenges that involve complex arrow functions. I have repeated the challenges but, I was wondering if there are any additional websites or practices you would recommend that may help solidify my understanding of this subject.
Thanks in advance,
Jeff

I find this book pretty enlightening and this chapter might be helpful: https://eloquentjavascript.net/05_higher_order.html

1 Like

The ES6 section kind of through me for a loop as well but my understanding is that arrow functions are used when creating an “anonymous” function - basically meaning you don’t need to give it a name because it’s not being reused or called anywhere else in your code. It’s purpose is just to run once and calculate a value or whatever else you need it to do. The arrow function itself is just ‘syntactic sugar’ to make writing these types of functions more concise.

A couple of resources you might be able to gain more insight from:

Hope this helps!

1 Like