I have js function to find min and max values in 2d array which works ok on small arrays but when I pass it big array it give me range error
:
Maximum call stack size exceeded.
I am using the latest version of Chrome.
function MaxMin2dray(arr, idx){
return {
min: Math.min.apply(null, arr.map(function (e) { return e[idx]})),
max: Math.max.apply(null, arr.map(function (e) { return e[idx]}))
}
}