When I type in an array into the parameter of the javascript math minimum and maximum functions, it returns the correct value:
console.log( Math.min( 5 ) );
When given no arguments, Math.min() equals infinity and Math.max() is -infinity.
Math.min()
Math.max()
-infinity
This is probably to ensure that any value is smaller than the minimum found so far, and larger than the maximum so far.