Skip to content

Instantly share code, notes, and snippets.

@NeuTrix
Created May 25, 2018 21:39
Show Gist options
  • Select an option

  • Save NeuTrix/f4dee73f095c09185cc2f2a5c082882c to your computer and use it in GitHub Desktop.

Select an option

Save NeuTrix/f4dee73f095c09185cc2f2a5c082882c to your computer and use it in GitHub Desktop.
Simple Factorial Function
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