You need to create an anonymous function that calculates the factorial of a number and sets the value of the factorial variable.
- Take notice that the anonymous function is called directly, and the result is saved to the
factorialvariable. - The factorial of a number is the result of multiplying integer numbers from
1to the number. For example5! = 1 * 2 * 3 * 4 * 5 = 120.