advantage of arrow function in es6 code example
Example 1: es6 arrow function
const multiplyES6 = (x, y) => x * y;
Example 2: es6 arrow function
// ES6
const prices = smartPhones.map(smartPhone => smartPhone.price);
console.log(prices); // [649, 576, 489]