ES6 / ES2015 Additions

Arrow functions (or fat functions)?Arrow functions (or fat functions)

An arrow function expression is a syntactically compact alternative to a regular function expression, although without its own bindings to the this, arguments, super, or new.target keywords. Arrow function expressions are ill suited as methods, and they cannot be used as constructors.

The key difference, despite being shorter to write, is that arrow functions do not create their own value for ‘this’.


If the function body contains just a single statement, you can omit the brackets and write all on a single line:

const myFunction = () => doSomething()

https://flaviocopes.com/javascript-arrow-functions/

(parameters) => { statements }

Template Strings / Template Literals


https://wesbos.com/javascript-template-strings/

Object Destructuring

https://dev.to/sarah_chima/object-destructuring-in-es6-3fm

Adding to Array

[…oldArray, itemToAdd]