Created
July 12, 2020 07:32
-
-
Save KR1470R/d560095e004e236596c06f11df2d329b to your computer and use it in GitHub Desktop.
Factorial Quick-Simple Way
This file contains hidden or 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
let facrorial = number=>{ | |
let f = 1 | |
let i = 1 | |
while (i<number){ | |
i+=1 | |
f = f*i | |
} | |
return f | |
} | |
let res = facrorial(5) | |
console.log(res,5**5) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment