why arrow functions in es code example
Example 1: js anonymous function es6
// (param1, param2, paramN) => expression
// ES5
var multiplyES5 = function(x, y) {
return x * y;
};
// ES6
const multiplyES6 = (x, y) => { return x * y };
Example 2: how to make javascript function consise
multiplyfunc = (a, b) => { return a * b; }