Created
October 3, 2017 20:46
-
-
Save nicholasaiello/753e2060553d0db4db1664aff29002e9 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
// return the factorial | |
const fact = (f) => ( | |
Array.from({length: f}, (v, i) => i + 1).reduce((sum, v) => sum *= v, 1) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment