Skip to content

Instantly share code, notes, and snippets.

@lisantwi
Last active September 12, 2019 17:56
Show Gist options
  • Save lisantwi/77fe1982f0ee851222bf3ed2d3e66c4c to your computer and use it in GitHub Desktop.
Save lisantwi/77fe1982f0ee851222bf3ed2d3e66c4c to your computer and use it in GitHub Desktop.
const factorial = function(n) {
if(n == 0) {
return 1
} else {
return n * factorial(n - 1);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment