We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b52001e commit 7a889e2Copy full SHA for 7a889e2
src/_Problems_/factorial/index.js
@@ -0,0 +1,8 @@
1
+function factorial(num) {
2
+ if (num === 1) return num;
3
+ else return num * factorial(num - 1);
4
+}
5
+
6
+module.exports = {
7
+ factorial,
8
+ };
0 commit comments