var 100 var 200 var 300 ---------- var max var min if max else min if

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
var a = 100;
var b = 200;
var c = 300;
//----------
var max;
var min;
if (a > b) {
max = a;
} else {
min = a;
}
if (max < c) {
max = c;
}
if (min > c) {
min = c;
}