Last active
March 17, 2016 19:28
-
-
Save compilerexe/54c1e8c7b2bf75e3cad6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function factorial(n) { | |
| if (n == 0) { | |
| return 1; | |
| } else { | |
| var read = n * factorial(--n); | |
| console.log(n + ":" + read); | |
| return read; | |
| } | |
| } | |
| factorial(10); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment