Min Function

Syntax

Number Min(Number number1, Number number2, etc.)

Return Value

Number

This function returns the smallest number in the set of numbers you pass it. Alternatively, you can use the prototype Min(Array array, [String/Number] [indexOrOffset]) to use this function to find the minimum element in an array. In this case, you can optionally pass a number or string for the second parameter to store the numeric array offset or array index string of the minimum element in the array, respectively.