const container = function(input_array) {
let highestArea = 0;
if(input_array.length <= 1) {
return 0;
}
for (let i = 0; i < input_array.length; i++) {
for (let j = i + 1; j < input_array.length; j++) {
let localArea = input_array[i] > input_array[j] ? input_array[j] * (j - i) : input_array[i] * (j - i);
console_string = 'input_array[i]: ' + input_array[i] + ' input_array[j]: ' + input_array[j] + ' i index: ' + i + ' j index: ' + j + ' Local Area: ' + localArea;
//console.log(console_string);
highestArea = localArea > highestArea ? localArea : highestArea;
}
}
console.log(highestArea);
}
container([6,9,3,4,5,8]);