Factorial mientras el bucle reverso en JavaScript
function myFactorial(number) {
var fact = 1;
var i = number;
while (i >= 1) {
fact = fact * i;
i--;
}
return fact;
}
console.log(myFactorial(6));
//Output: 720;
Ariful Islam Adil(Code Lover)