Skip to content

Instantly share code, notes, and snippets.

@brianfiszman
Created July 12, 2018 21:11
Show Gist options
  • Save brianfiszman/61f628853109b84a3602d2ddc53abfc1 to your computer and use it in GitHub Desktop.
Save brianfiszman/61f628853109b84a3602d2ddc53abfc1 to your computer and use it in GitHub Desktop.
Get a factorial
/*
* Create the function factorial here
*/
const factorial = (n) => (1 < n && n <= 10) ? n * factorial(--n) : n;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment