📌  相关文章
📜  Day 4: Classes hackerrank 10天的javascript解决方案——Javascript代码示例

📅  最后修改于: 2022-03-11 15:01:51.190000             🧑  作者: Mango

代码示例4
// 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;
}