I know this gets asked again and again but hear me out - this question is slightly different.
I can get a max or min from a 1D array like this:
var
If you are saying it is 2D array then it should have one less []
var myArray = [[1, 112.0],[2,5.12],[3,113.1],[4,33.6],[5,85.9],[6,219.9]];
var w_max=+Infinity;
var w_min=-Infinity;
for(var i=0;i< myArray.length;i++){
elementArray = myArray[i];
if(w_max < Math.max.apply(Math, elementArray)){
w_max = Math.max.apply(Math, elementArray);
}
if (w_min > Math.min.apply(Math, elementArray)){
w_min = Math.min.apply(Math, elementArray);
}
}