📅  最后修改于: 2022-03-11 15:01:40.655000             🧑  作者: Mango
var factorial = 1;
function myfact(fact) {
for (let i = 1; i <= 5; i++) {
factorial = factorial * i;
}
return factorial;
}
console.log(myfact(factorial))
// Output: 120