📅  最后修改于: 2022-03-11 15:01:51.190000             🧑  作者: Mango
// Day 1: Functions hackerrank 10 days of javascript solution
function factorial(n){
let result = 1;
for(let i=1; i<=n; i++){
result = result * i;
}
return result;
}