diff --git a/Maths/Factorial.js b/Maths/Factorial.js index 7dc6fd6d6f..22285c254a 100644 --- a/Maths/Factorial.js +++ b/Maths/Factorial.js @@ -11,6 +11,12 @@ https://en.wikipedia.org/wiki/factorial */ +/** + * Returns the factorial of a number n. + * Factorial is the product of all positive integers up to n. + * Example: factorial(5) = 5 ×ばつかける 4 ×ばつかける 3 ×ばつかける 2 ×ばつかける 1 =わ 120 + */ + 'use strict' const calcRange = (num) => {