Last active
May 17, 2016 23:25
-
-
Save milleraundra/feb0a69e3310f611fb4f40037bd358bf to your computer and use it in GitHub Desktop.
Factorial Recursion - Reverse
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(number, start = 1) { | |
if (start == number) { | |
return number; | |
} else { | |
return start * factorial(number, start + 1); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment