1. Assign a variable to an object property key of the same name.
// The long and the short way
const name = 'Stone temple pilots';
let band = {
    name: name
};
const title = 'Purple'
let disc = { title };

// We can compose them into new object
let discography = {...band, ...disc};
  1. Extract values from an object and assign them to named variables.
const [dog, cat] = ['Bobby', 'Bilbo'];

const puppy = {
    name: 'Bobby'
};
const { name } = puppy;
// Assigning a different name for the binding
const { name: firstname } = puppy;
  1. Functions expressions can be assign to names.
const divide = x => x / 2;
  1. Default value for a parameter.
const name = (name = 'Morrisey') => name;
  1. Use an object as parameter and destructuring it to get named arguments.
const book = {
    title: 'Two on a tower',
    pages: 567,
}
const readBook = ({title, pages}) => ({
    title,
    pages
});
readBook(book);
  1. Gather together remaining arguments (Rest).
const printTail = (first, ...tail) => tail;
  1. Spread to individual elements.
const printTail = (first, ...tail) => [...tail, first];
  1. Currying
const curried = curry => coriander => coriander + curry;
curried(5)(2); // 7

// autocurry
const autoCurried = curry((a, b, c) => a + b + c);
autoCurried(1)(2)(3); // 6 - using Lodash
  1. Arr.map
const numbers = [3, 4, 5];
numbers.map((a) => a / 2); // [1.5, 2, 2.5]