Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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 };
Source by www.sitepoint.com #
 
PREVIOUS NEXT
Tagged: #js #anonymous #function
ADD COMMENT
Topic
Name
1+6 =