BeginnerJavaScript

Factorial of a number

Write a function that calculates the factorial of a given number.

Examples

Input: 5

Output: 120

Your Solution

Output

Click 'Run Code' to see the output