Number.MIN_VALUE

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.

Number.MIN_VALUE 속성은 JavaScript가 표현할 수 있는 제일 작은 양의 숫자 값을 나타냅니다.

시도해보기

function divide(x, y) {
  if (x / y < Number.MIN_VALUE) {
    return "Process as 0";
  }
  return x / y;
}

console.log(divide(5e-324, 1));
// Expected output: 5e-324

console.log(divide(5e-324, 2));
// Expected output: "Process as 0"
Property attributes of Number.MIN_VALUE
쓰기 가능불가능
열거 가능불가능
설정 가능불가능

설명

MIN_VALUE 속성은 JavaScript에서 표현할 수 있는, 0에 가장 가깝지만 음수는 아닌 수입니다.

MIN_VALUE의 값은 약 5e-324입니다. MIN_VALUE보다 작은 값("언더플로우 값")은 0으로 변환됩니다.

MIN_VALUENumber의 정적 속성이기 때문에, 직접 생성한 Number 객체의 속성이 아니라 Number.MIN_VALUE 형식으로 사용해야 합니다.

예제

MIN_VALUE 사용하기

다음 코드는 숫자를 두 개의 수를 받아 나누기 연산을 합니다. 만약 결과가 MIN_VALUE 보다 크거나 같으면 func1 함수를 호출하고, 그렇지 않으면 func2 함수를 호출합니다.

js
if (num1 / num2 >= Number.MIN_VALUE) {
  func1();
} else {
  func2();
}

명세

Specification
ECMAScript® 2025 Language Specification
# sec-number.min_value

브라우저 호환성

Report problems with this compatibility data on GitHub
desktopmobileserver
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
Deno
Node.js
MIN_VALUE

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support

같이 보기