Arrow functions in JavaScript — What, Why, and How — Fun Fun Function #32

Mattias Petter Johansson
Fun Fun Function
Published in
1 min readMay 16, 2016

--

Video below:

Arrow functions are (pretty much) a shorter function syntax in JavaScript. Because of their extreme terseness, arrow functions allows us to use use functions in a new way, making lots of functions that are small, inline and single-purpose.

Table of contents:
00:18 ► What are arrow functions in JavaScript
00:53 ► Why use arrow functions in JavaScript
02:39 ► How to use arrow functions in JavaScript
07:41 ► Boilerplate problem with vanilla functions in JavaScript
09:36 ► Refactoring vanilla JavaScript functions to arrow functions
10:25 ► Implicit returns in arrow functions
13:36 ► Short argument names in arrow functions example
15:58 ► Summary of arrow functions in JavaScript

I’m also active on:
► Twitter https://twitter.com/mpjme
► Medium https://medium.com/@mpjme
► Quora https://www.quora.com/profile/Mattias-Petter-Johansson

Resources:
► .filter explained
https://www.youtube.com/watch?v=BMUiFMZr7vk&list=PL0zVEGEvSaeEd9hlmCXrk5yUyqUag-n84&index=1

► .map explained
https://www.youtube.com/watch?v=bCqtb-Z5YGQ&index=2&list=PL0zVEGEvSaeEd9hlmCXrk5yUyqUag-n84

► .reduce explained
https://www.youtube.com/watch?v=Wl98eZpkp-c&index=3&list=PL0zVEGEvSaeEd9hlmCXrk5yUyqUag-n84

► Fun Fun Function channel
https://www.youtube.com/channel/UCO1cgjhGzsSYb1rsB4bFe4Q

► Code from the episode
https://gist.github.com/mpj/8256bdfae3168733a0bf733c604142d0

► Music by 7 Minutes Dead
https://www.youtube.com/watch?v=Mi-xOhMqrkg
https://open.spotify.com/track/3lowQiTjd2FBGoFw228QXa

--

--

Mattias Petter Johansson
Fun Fun Function

Creator of Fun Fun Function, a YouTube show about programming.