Day 1: Functions

/*
 * Create the function factorial here
 */
function factorial(n) {
    return (n >= 1 && n <= 10) ? n * factorial(n - 1) : 1;
}

 

posted @ 2019-07-20 11:27  乱世有歌舞  阅读(143)  评论(0)    收藏  举报