The Fauna service will be ending on May 30, 2025.

For more information on the service wind down, see our announcement and the Fauna Service End-of-Life FAQ.

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
\