<script>
var a=1;
var b=2;
var c=3;
var max=(a>b)?a:b;
max=(max>c?max:c)
var min=(a<b?a:b);
min=(min<c?min:c)
console.log("最大值:"+max);
console.log("最小值:"+min);
</script>
<script>
var a=1;
var b=2;
var c=3;
var max=(a>b)?a:b;
max=(max>c?max:c)
var min=(a<b?a:b);
min=(min<c?min:c)
console.log("最大值:"+max);
console.log("最小值:"+min);
</script>