Question 73
Question
Answer
function add(x) {
return function(y) {
return x + y;
};
}
const add5 = add(5); // Now add5 is a function that takes one argument and adds 5 to it
console.log(add5(3)); // Output: 8 (because 5 + 3 = 8)Last updated