var 17 19 25 21 var 18 20 45 11 -------------------- --- var sum1 var

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
var x = [17, 19, 25, 21];
var y = [18, 20, 45, 11];
//-----------------------
var sum1 = 0;
var sum2 = 0;
for (var i = 0; i < 4; i++) {
sum1 = sum1 + x[i];
sum2 = sum2 + y[i];
}
if (sum1 > sum2){
console.log("1")
} else if (sum1 === sum2){
console.log("DRAW")
} else{
console.log("2")
}