var cost 157 98 54 var size 35 25 99 var max cost size var min cost si

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
var cost = [157,98,54];
var size = [35, 25, 99];
// =======================================================================
var max = [cost[0], size[0]]
var min = [cost[0], size[0]]
var max = 0;
for (var i = 0; i < cost.length; i++) {
for (var j = i; j < size.length; j++) {
if (cost[i] * size[j] > max) {
max = cost[i] * size[j];
}
}
}
console.log(max);