JavaScript’s Arrow Functions Explained By Going Down A Slide

Kevin Kononenko on April 20, 2019

If you have been using JavaScript for a few years, you are probably familiar with this syntax: function addTen(num){ return num + 10; }); c... [Read Full]
markdown guide
 

this is great, amusing and easy to understand!
I now see slides all over my code :)
love it

 
 

This is really nice way of explaining it. However my OCD is killing me , I was expecting the parameters to be animated as they slide down to the landing pad. Still great post!

 
 

Maybe I read it too fast or I'm too tired but I don't see where you explain why there's no return keyword in your first arrow function example...

 
 

Hey, Dirk is correct with his comment about implicit returns. But, for the sake of clarity, I added another code block showing the same function using the return keyword!

 

It is very difficult for me to not make "wheeee" sound effects while reading this article.

Thank you.

code of conduct - report abuse