js实现输入三个数字,顺序输出

//输入三个数字,顺序输出
function order(a,b,c){
var min,mid,max;
if(a min=a;
if(b mid=b;
max=c;
}else{
mid=c;
max=b;
}
}else if(b min=b;
if(a mid=a;
max=c
}else{
mid=c;
max=a;
}
}else{ // a min=c;
if(a mid=a;
max=b;
}else{
mid=b;
max=a
}
}
return min+’ ‘+mid+’ '+max;
}
var result=order(3,83,6);
console.log(result);

你可能感兴趣的:(js_demo)