/*计算阶乘*/
function factorial(val){
if(val === 1 ) return val=1;
return val* factorial(val-1);
}
factorial(10);
function factorial(val){
if(val === 1 ) return val=1;
return val+factorial(val-1);
}
factorial(10);
/*计算阶乘*/
function factorial(val){
if(val === 1 ) return val=1;
return val* factorial(val-1);
}
factorial(10);
function factorial(val){
if(val === 1 ) return val=1;
return val+factorial(val-1);
}
factorial(10);