Thursday , September 19 2024

We define a function using the following 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 the following 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 the following function expression:

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

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

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

More Questions: JavaScript Essentials 1 – JSE1: Module 5 Test