What is the result of the following code?
function multiplyBy(a) {
return function(b) {
return a * b;
};
}
const byTwo = multiplyBy(2);
console.log(byTwo(4));
What is the result of the following code?
function multiplyBy(a) {
return function(b) {
return a * b;
};
}
const byTwo = multiplyBy(2);
console.log(byTwo(4));