arrow function javascript ecmascript 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]