Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

arrow function javascript

// Traditional Function
function myFunction(param) {
  var a = param * 3;
  return a;
}

//Arrow Function
let myFunction = (a, b) => {
  let c = (a * b) + 3;
  return c;
}
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #arrow #function #javascript
ADD COMMENT
Topic
Name
3+2 =