I\'ve been debugging this code for about an hour, and it looks like Math.min([1,2]) returns NaN.
Math.min([1,2])
NaN
var int_array = [1,2] console.log(
This
var int_array = [1,2]; console.log(Math.min.apply(null,int_array));
will work in all actual browsers.