What is the result of the following code?
function firstLevel(a) {
function secondLevel(b) {
function thirdLevel(c) {
return a + b + c;
}
return thirdLevel;
}
return secondLevel;
}
console.log(firstLevel(1)(2)(3));
What is the result of the following code?
function firstLevel(a) {
function secondLevel(b) {
function thirdLevel(c) {
return a + b + c;
}
return thirdLevel;
}
return secondLevel;
}
console.log(firstLevel(1)(2)(3));