The following arrow function has been defined:
let multiply = (m, n) => m * n;
How would you rewrite the function without changing what it does? Select the correct definition.
-
let multiply = (m, n) => return (m * n);
-
let multiply = (m, n) => { m * n; }
-
let multiply = (m, n) => { console.log(m * n); }
-
let multiply = (m, n) => { return (m * n); }
Explanation & Hint:
To rewrite the given arrow function without changing its functionality you would have to do this: let multiply = (m, n) => {return (m * n);} The multiply variable is declared using the let keyword. The calculated result is returned using the return keyword. |