July 11th, 2024
What's missing in this code?
// Can you complete the code to find
// the factorial?
factorial(5); // -> 120
function factorial(n)
return [
(n)].reduce(
(acc, _, i) => acc *
,
);
Type or select from these options