n!
For example: 5! = 1 * 2 * 3 * 4 * 5 = 120
Only integers greater than or equal to zero will be supplied to the function.
Remember to use Read-Search-Ask if you get stuck. Write your own code.
factorialize(5)
should return a number.
testString: 'assert(typeof factorialize(5) === "number", "factorialize(5)
should return a number.");'
- text: factorialize(5)
should return 120.
testString: 'assert(factorialize(5) === 120, "factorialize(5)
should return 120.");'
- text: factorialize(10)
should return 3628800.
testString: 'assert(factorialize(10) === 3628800, "factorialize(10)
should return 3628800.");'
- text: factorialize(20)
should return 2432902008176640000.
testString: 'assert(factorialize(20) === 2432902008176640000, "factorialize(20)
should return 2432902008176640000.");'
- text: factorialize(0)
should return 1.
testString: 'assert(factorialize(0) === 1, "factorialize(0)
should return 1.");'
```