📜  如何获取阶乘数字 - Javascript 代码示例

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

代码示例1
//This is how you can make a factorial out of the number that the user has given
const factorial = (number) =>{
    let result = 1
    for(let i = 1; i<=number;i++){
        result = result*i
    }
      return console.log(result)
  }