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 ) ); // 5
console.log( Math.max( 2 ) ); // 2
var array = [3, 6, 1, 5, 0, -2, 3];
var minArray = Math.min( array ); // -2
var maxArray = Math.max( array ); // 6
However, when I use the function with no parameters, it returns an incorrect answer:
console.log( Math.min() ); // Infinity
console.log( Math.max() ); // -Infinity
This one returns false:
console.log( Math.min() < Math.max() );
Why does it do this?