What will be the value of result after executing the following recursive function?
function factorial(n) {
if (n === 0) {
return 1;
}
return n * factorial(n - 1);
}
let result = factorial(5);
What will be the value of result after executing the following recursive function?
function factorial(n) {
if (n === 0) {
return 1;
}
return n * factorial(n - 1);
}
let result = factorial(5);