JavaScriptNumberMath.min

Returns the smallest of the given numbers.

문법

Math.min(...values)

예제

아래 값을 입력하면 예제에 즉시 반영됩니다.

console
Math
const
arr
console.log(Math.min(1, 3, 2, 5, 4));   // 1
const arr = [1, 3, 2, 5];
console.log(Math.min(...arr));           // 1