Last active
September 19, 2018 10:02
-
-
Save vasanthv/f8ace98365b4c7d51ea6e7a6d6b8efde to your computer and use it in GitHub Desktop.
Get factorial of the given number
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 = (n) => (Array.from(Array(n), (_, i) => i + 1)).reduce((a, b) => a * b); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment