Without jquery, using this answer to add max and min to arrays:
Array.prototype.max = function() { return Math.max.apply(null, this); }; Array.prototype.min = function() { return Math.min.apply(null, this); };
The answer will be as follows:
arr = [[1, 5, 8, 9], [3, 7], [3, 8, 33], [2], [0, 6]] maxm = arr.map(function(a){return a.max()}).max(); minm = arr.map(function(a){return a.min()}).min();
Raul guiu
source share