function fu(a,b,c){ var avg =(a+b+c)/3; return avg;}function li(1,2,3){ document.write=fu(1,2,3); var value=fu(a,b,c); document.write(value)}li(10,20,30);
1、li函数的默认值有问题;
2、document.write是函数不能直接用“=”
function fu(a,b,c){
var avg =(a+b+c)/3;
return avg;
}
function li(a=1,b=2,c=3){
document.write(fu(1,2,3));
var value=fu(a,b,c);
document.write(value);
li(10,20,30);