var cost 99 88 54 var size 35 25 99 888 var max for var cost length fo

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
var cost = [7,99,88, 54]
var size = [35, 25, 99, 888];
// =======================================================================
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);