Код: Выделить всё
function Factorial(a){
if(a === 0 || a === 1) 2 units of time
return 1; 1 unit of time
return a*Factorial(n-1); n
}
console.log(Factorial(6));
Подробнее здесь: https://stackoverflow.com/questions/794 ... is-program
Код: Выделить всё
function Factorial(a){
if(a === 0 || a === 1) 2 units of time
return 1; 1 unit of time
return a*Factorial(n-1); n
}
console.log(Factorial(6));