Calculates the factorial of a number, returning 0 if that number is less than 0. A factorial is the product of an integer and all the integers below it. For instance, the factorial of 5 is 5 x 4 x 3 x 2 x 1 which is 120.

Input Fields

  • number (Number): the initial value

Output Fields

  • output (Number): the value produced from the factorial operation

Examples:

Factorial of 3 is 9 (3 x 2 x 1) Factorial of 6 is 720 (6 x 5 x 4 x 3 x 2 x 1)