Answers for "arrow function syntax vs function expression syntax"

-1

arrow function syntax vs function expression syntax

// Using function expression syntax
const addNums = function(numOne, numTwo) {
  return numOne + numTwo;
};

// Using new arrow function syntax
const addNums = (numOne, numTwo) => {
  return numOne + numTwo;
};
Posted by: Guest on July-13-2021

Browse Popular Code Answers by Language