Calculate the factorial of a number
5
120
Time: 2s · Memory: 256 MB
Use a loop to multiply numbers from 1 to n.
> Run your code to see console output.