Math.min()

Get the smaller of the input parameter Numbers.

Signature

Math.min(x: Number, y: Number) => Number

Description

Compare the input parameter Numbers and return the smaller Number.

Parameters

Parameter Type Required Description

x

Number

true

A number.

y

Number

true

A number

Return value

Type Description

Number

Smaller of the provided numbers.

Examples

let a = 20;
let b = 5;
Math.min(a, b)
5
\