Skip to content

Instantly share code, notes, and snippets.

@muum
Created Sep 13, 2020
Embed
What would you like to do?
Finding Factorial of a Number with JavaScript
function factorial(num) {
if(num <= 0) {
return 1;
} else {
let result = num * factorial(num - 1)
return result;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment