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
Please login or Register to submit your answer