Skip to content

Commit dc40770

Browse files
nik-revmao-sz
andauthored
feat/ improve wording
Co-authored-by: MaoShizhong <[email protected]>
1 parent 6c72df8 commit dc40770

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

13_factorial/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Exercise 13 - Factorial
22

3-
Create a function that takes an input integer greater than or equal to 1 and returns the product of all its predecessing integers. If 0 is input it returns 1. It should accept strings that when converted to a number are valid inputs. For invalid inputs it returns `undefined`.
3+
Write a recursive function that takes a non-negative integer, and returns the product of all positive integers less than or equal to the input integer. An input of `0` should return `1`. The function should only accept numbers, so `'4'` should not be accepted as it is a string. All invalid inputs should return `undefined`.
44

55
For example:
66

0 commit comments

Comments
 (0)