Easy10 min
Calculate a Factorial
Return the factorial of a nonnegative integer. The factorial of zero is one.
Your function
Implement solve(value, extra) in JavaScript. Return the answer; printing alone does not count as a result.
Examples
Input:
[0]Output:
1Input:
[1]Output:
1Constraints
0 ≤ value ≤ 12