Created
May 25, 2018 21:39
-
-
Save NeuTrix/f4dee73f095c09185cc2f2a5c082882c to your computer and use it in GitHub Desktop.
Simple Factorial Function
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
| const factorial = (num) => { | |
| return num === 0 ? 1 : num * factorial(num-1) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment