📜  大数字阶乘 js - Javascript 代码示例

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

代码示例2
var factorial = function(n){n=BigInt(n);return (n==0n||n==1n)?1n:factorial(n-1n)*n;}
//can be print this way
console.log( factorial(n) );