哪位大神知道是啥情況,謝謝,按了沒反應(yīng)
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));
}
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));
}
2018-10-30
舉報(bào)
2018-10-30
b=Math.ceil(a)是賦值
2018-11-13
正確的是:
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));