Back to functions

fact


factorial

Calculates the factorial of a number.

Usage: nerdamer("factorial(x)")


Parameters

expression x Returns the appropriate value if possible otherwise it returns the function with the simplified expression

Returns

Expression

EXAMPLES:
var x = nerdamer('fact(5)').evaluate();
console.log(x.text());
x = nerdamer('fact(9.1)').evaluate();
console.log(x.text());
x = nerdamer('(4/5)!*3!-1').evaluate();;
console.log(x.text());
OUTPUT:
Back to functions