From 8096f6d73149a3ab2366817d3ac51c197a6c76a0 Mon Sep 17 00:00:00 2001 From: Vikash565-dot Date: Wed, 10 Dec 2025 11:24:28 +0530 Subject: [PATCH] Add JSDoc comments for factorial function which is example of the factorial code output. Added documentation for the factorial function. --- Maths/Factorial.js | 6 ++++++ 1 file changed, 6 insertions(+) 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) => {