I have a multidimensional array of x columns and y rows. How can I find the min and the max value of the matrix? Example:
[[1, 37.8, 80.8, 41.8], [2, 30.9, 69.
let
var arr = [[2,3], [4,5]]; // a multidimensional array
then get an array with each row's maximum with
var maxRow = arr.map(function(row){ return Math.max.apply(Math, row); });
and the overal maximum with
var max = Math.max.apply(null, maxRow);