📅  最后修改于: 2022-03-11 15:02:34.990000             🧑  作者: Mango
// day 9 recursion 3 hackerrank solution in javascript
function factorial(n) {
// Write your code here
if(n<=1){
return 1;
}else{
return n * factorial(n - 1);
}
}