📦 Archived documentation: r1 (committed 2026-10-07) View current documentation →

Math.min()

Math.min(...values) → number

Returns the smallest of zero or more numbers.

Returns the smallest of the given numbers. Returns Infinity if no arguments are given, and NaN if any argument is NaN.

Arguments

NameTypeRequiredDefaultDescription
...values number optional — Zero or more numbers to compare.

Returns

number The smallest of the given numbers.

Example

let lo = Math.min(3, 9, 4); // 3