Calculates the minimum and maximum values from a list of numbers.
This function iterates through the provided numbers to find the smallest and largest values.
Its equivalent to calling Math.min and Math.max, but does the iteration only once.
Math.min
Math.max
The values to calculate the min and max of.
An object containing the min and max values, or min = Infinity and max = -Infinity if no values are provided.
Infinity
-Infinity
Calculates the minimum and maximum values from a list of numbers.
This function iterates through the provided numbers to find the smallest and largest values.
Its equivalent to calling
Math.min
andMath.max
, but does the iteration only once.