Created
February 4, 2017 20:01
-
-
Save timothy/3b9897011e6d7d33f48aebb5c17c3f99 to your computer and use it in GitHub Desktop.
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
/** | |
* Author https://github.com/timothy | |
* @return {number} | |
*/ | |
function Factorial(num) { | |
return num <=1 ? 1 : num * Factorial(num - 1); | |
} | |
console.log(Factorial(8)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment