We define a function using a function expression: let sum = function (a, b) { return (a + b); } What could the definition of the corresponding arrow function look like?

Questions BankCategory: JavaScript Essentials 1We define a function using a function expression: let sum = function (a, b) { return (a + b); } What could the definition of the corresponding arrow function look like?
We define a function using a function expression:

let sum = function (a, b) {
    return (a + b);
}

What could the definition of the corresponding arrow function look like?

  • let sum = (a, b) => { a + b; };
  • let sum = (a, b)-- > a + b;
  • let sum = function (a, b)
    =>
    {
        return (a + b);
    }
  • let sum = (a, b) => a + b;

More Questions: JavaScript Essentials 1 – JSE1: Final Test