Created
March 30, 2019 09:24
-
-
Save ZackFox/f1ff4f418d66b8470b14e98e5c6e2f47 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
function fact(n){ | |
var res = n; | |
if(n < 0) return "Undefined"; | |
for(let i = n-1; i > 1; i--){ | |
res *= i; | |
} | |
return res; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment