Calculate the factorial of a number.
5
120
Time: 2s · Memory: 256 MB
Use recursion or iteration.
> Run your code to see console output.