How can I easily obtain the min and max values from a very big JavaScript Array (e.g 250 thousand numbers)?
I tried to use this method, but it does not work: JavaScript: min & max Array values?
I'm debugging in VisualStudio where I don't get any error, while in the browser I get "Maximum call stack size exceeded".
Example code:
var max = Math.max.apply(-Infinity, arr);
var min = Math.min.apply(Infinity, arr);
"arr" is my very big array.