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
사용하기
다음 코드는 숫자를 두 개의 수를 받아 나누기 연산을 합니다. 만약 결과가 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 GitHubdesktop | mobile | server | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
MIN_VALUE |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.