Learning JavaScript ES6
- Part 1: Let and Const
- Part 2: Template Literals
- Part 3: Default Parameter Values
- Part 4: Arrow Functions
- Part 5: Classes
JavaScript ES6 (ECMAScript 6) is a newer specification for JavaScript introduced in 2015 and adopted by most browsers starting in mid-2016. It added new syntax and a greater ability to use object-oriented programming in JavaScript.
Arrow Functions
In previous versions of JavaScript, anonymous functions were often used in situations where a quick calculation or the use of a function used to move through some organized data might be needed.

Using Arrow Functions
To help in these common situations, ES6 introduced arrow functions. These are a reduced syntax versions of anonymous functions that are written using the arrow, =>.

In most cases, arrow functions can replace anonymous function usage with the shorthand syntax. Even when dealing with multiple parameters, an open and close parenthesis can enclose the data passed to the arrow function.