function product(a,b){
return a*b;
}product(5);//25product(5,0);//0
function product(a,b=a){ return a*b; }
有帮助的话,请点采纳该答案~