JavaScript tutorial:
min method

 

Applies to: Math Object

The min method is use to get the lesser of two supplied numbers.

Syntax

retVal = Math.min(number1, number2)

The min method syntax has these parts:

Part

Description

retVal

The lesser of number1 or number2.

number1

A numeric expression to be compared to number2.

number2

A numeric value to be compared to number1.

Return value

Returns the lesser of two supplied numbers.

See also: Math Object Methods, max Method