factorial
factorial(x) ⇒ number
Compute factorial of X (X!) Note that factorial of 13 is already 6,227,020,800 which exceeds 32bit integer limit Note that this implementation is intended for small inputs only
Kind: global function
| Param | Type | Description |
|---|---|---|
| x | number | must be an integer |
Example
factorial(5) == 5 * 4 * 3 * 2 * 1 == 120