We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6509314 + fbeeb31 commit 73bffc9Copy full SHA for 73bffc9
factorial/factorial.js
@@ -0,0 +1,7 @@
1
+function factorial(n) {
2
+ if (n === 0) {
3
+ return 1;
4
+ }
5
+ return n * factorial(n - 1);
6
+}
7
+console.log(factorial(100));
0 commit comments