Last active
July 21, 2016 03:23
-
-
Save mytholog/d5fa5a41b2af1d4009b8314443ff7e61 to your computer and use it in GitHub Desktop.
Factorial
This file contains 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) { | |
return (n != 1) ? n * factorial(n - 1) : 1; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment