function mm(a){
if(b=Math.ceil(a)){
return b
}
document.write(mm(3.3));
document.write(mm(-0.1));
document.write(mm(-9.9));
document.write(mm(8.9));
}
b=Math.ceil(a)是赋值
正确的是:
function mm(a){
if(a!=0){
var b=Math.ceil(a)
return b;
}else{
return a;
}
}
document.write(mm(3.3));
document.write(mm(-0.1));
document.write(mm(-9.9));
document.write(mm(8.9));