Charlie Harvey


The Math.max() and Math.min() are unfair.

Math.max() = -Infinity (smallest number possible) Math.min() = Infinity (largest number possible)

Since the smallest number of a list of no numbers MUST be infinitely large - as otherwise, the smallest number of the list of one number would never be that number, but -Infinity instead (or - you'd throw an error which Javascript can't handle very well, right?)

So, the logical result would be to have a default polar opposite to what you want and return that as a result of a comparison to the empty set.