Fixed formatting problems and JSDoc (#131)
* Fixed formatting problems and JSDoc * Added returns for JSDoc
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
const fact = (x) => {
|
||||
if (x === 1) {
|
||||
return 1;
|
||||
}
|
||||
/**
|
||||
* Consider the factorial of the number
|
||||
* @param {number} x Number
|
||||
* @returns {number} Result
|
||||
*/
|
||||
const fact = x => {
|
||||
if (x === 1) return 1;
|
||||
return x * fact(x - 1);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user