9609c04755
W3Schools 튜토리얼을 P-Reinforce v3.1 포맷으로 위키화(영어 본문, 한/영 섹션 헤더). - Topic_HTML: 59문서 (튜토리얼+예제, 레퍼런스/메타 제외) - Topic_CSS: 190문서 (메인 + Advanced/Flexbox/Grid/RWD 전체) - Topic_JavaScript: 120문서 (코어 언어; Temporal/DOM상세/BOM/WebAPI/AJAX/jQuery/Graphics 등은 후속) 각 폴더 00_INDEX.md(MOC) 포함. 코드 verbatim, 미확인분은 "Not found in source" 표기. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
156 lines
6.1 KiB
Markdown
156 lines
6.1 KiB
Markdown
---
|
||
id: javascript-number-properties
|
||
title: "JavaScript Number Properties"
|
||
category: "Frontend"
|
||
status: "draft"
|
||
verification_status: "conceptual"
|
||
canonical_id: ""
|
||
aliases: ["Number properties", "Number.MAX_VALUE", "Number.EPSILON", "MAX_SAFE_INTEGER", "POSITIVE_INFINITY", "Number.NaN"]
|
||
duplicate_of: ""
|
||
source_trust_level: "B"
|
||
confidence_score: 0.88
|
||
created_at: 2026-06-23
|
||
updated_at: 2026-06-23
|
||
review_reason: ""
|
||
merge_history: []
|
||
tags: ["javascript", "js", "web", "frontend", "w3schools", "number", "constants"]
|
||
raw_sources: ["https://www.w3schools.com/js/js_number_properties.asp"]
|
||
applied_in: []
|
||
github_commit: ""
|
||
---
|
||
|
||
# [[JavaScript Number Properties]]
|
||
|
||
## 🎯 한 줄 통찰 (One-line insight)
|
||
JavaScript Number properties are static constants on the `Number` object that expose the limits of the language's numeric type — its largest, smallest, safe-integer bounds, infinities, and the not-a-number value. [S1]
|
||
|
||
## 🧠 핵심 개념 (Core concepts)
|
||
- **Number properties are static** — they belong to the `Number` object itself and can only be accessed as `Number.PROPERTY` (for example `Number.MAX_VALUE`), never through a number variable or instance. [S1]
|
||
- **EPSILON** is the difference between 1 and the smallest floating-point number greater than 1. [S1]
|
||
- **MAX_VALUE / MIN_VALUE** are the largest and lowest possible numbers in JavaScript. [S1]
|
||
- **MAX_SAFE_INTEGER / MIN_SAFE_INTEGER** are `2⁵³ − 1` and `−(2⁵³ − 1)` — the bounds of integers that can be represented exactly. [S1]
|
||
- **POSITIVE_INFINITY / NEGATIVE_INFINITY** are returned on numeric overflow (for example `1 / 0` and `-1 / 0`). [S1]
|
||
- **NaN** ("Not a Number") is returned by invalid arithmetic such as dividing a number by a non-numeric string. [S1]
|
||
|
||
## 🧩 추출된 패턴 (Extracted patterns)
|
||
- **Static access only** — reach a property as `Number.MAX_VALUE`; reading the same name off a variable (`x.MAX_VALUE`) yields `undefined`. [S1]
|
||
- **Overflow → Infinity** — operations that exceed the representable range produce `Infinity` rather than throwing an error. [S1]
|
||
- **Invalid arithmetic → NaN** — mixing a number with a non-numeric string in arithmetic produces `NaN`. [S1]
|
||
|
||
## 📖 세부 내용 (Details)
|
||
Number properties belong to the JavaScript `Number` object. These properties can only be accessed as `Number.MAX_VALUE` (statically), not on a variable. [S1]
|
||
|
||
**JavaScript EPSILON** — the difference between 1 and the smallest floating-point number greater than 1: [S1]
|
||
```javascript
|
||
let x = Number.EPSILON;
|
||
```
|
||
|
||
**JavaScript MAX_VALUE** — the largest possible number in JavaScript: [S1]
|
||
```javascript
|
||
let x = Number.MAX_VALUE;
|
||
```
|
||
|
||
**Number Properties Cannot be Used on Variables** — accessing a property name on a number variable returns `undefined`: [S1]
|
||
```javascript
|
||
let x = 6;
|
||
x.MAX_VALUE
|
||
```
|
||
|
||
**JavaScript MIN_VALUE** — the lowest possible number in JavaScript: [S1]
|
||
```javascript
|
||
let x = Number.MIN_VALUE;
|
||
```
|
||
|
||
**JavaScript MIN_SAFE_INTEGER** — `−(2⁵³ − 1)`: [S1]
|
||
```javascript
|
||
let x = Number.MIN_SAFE_INTEGER;
|
||
```
|
||
|
||
**JavaScript MAX_SAFE_INTEGER** — `2⁵³ − 1`: [S1]
|
||
```javascript
|
||
let x = Number.MAX_SAFE_INTEGER;
|
||
```
|
||
|
||
**JavaScript POSITIVE_INFINITY** — accessed as a property: [S1]
|
||
```javascript
|
||
let x = Number.POSITIVE_INFINITY;
|
||
```
|
||
|
||
`POSITIVE_INFINITY` is returned on overflow: [S1]
|
||
```javascript
|
||
let x = 1 / 0;
|
||
```
|
||
|
||
**JavaScript NEGATIVE_INFINITY** — accessed as a property: [S1]
|
||
```javascript
|
||
let x = Number.NEGATIVE_INFINITY;
|
||
```
|
||
|
||
`NEGATIVE_INFINITY` is returned on overflow: [S1]
|
||
```javascript
|
||
let x = -1 / 0;
|
||
```
|
||
|
||
**JavaScript NaN — Not a Number** — accessed as a property: [S1]
|
||
```javascript
|
||
let x = Number.NaN;
|
||
```
|
||
|
||
`NaN` also results from invalid arithmetic, such as dividing by a non-numeric string: [S1]
|
||
```javascript
|
||
let x = 100 / "Apple";
|
||
```
|
||
|
||
**Property summary table** [S1]
|
||
|
||
| Property | Description |
|
||
|----------|-------------|
|
||
| `Number.EPSILON` | The difference between 1 and the smallest floating-point number greater than 1 |
|
||
| `Number.MAX_VALUE` | The largest possible number in JavaScript |
|
||
| `Number.MIN_VALUE` | The lowest possible number in JavaScript |
|
||
| `Number.MAX_SAFE_INTEGER` | The maximum safe integer (`2⁵³ − 1`) |
|
||
| `Number.MIN_SAFE_INTEGER` | The minimum safe integer (`−(2⁵³ − 1)`) |
|
||
| `Number.POSITIVE_INFINITY` | Returned on overflow (e.g. `1 / 0`) |
|
||
| `Number.NEGATIVE_INFINITY` | Returned on negative overflow (e.g. `-1 / 0`) |
|
||
| `Number.NaN` | Not a Number (e.g. `100 / "Apple"`) |
|
||
|
||
## 🛠️ 적용 사례 (Applied in summary)
|
||
The page's own snippets are the canonical applied examples — accessing each constant via `Number.*` and demonstrating overflow (`1 / 0`) and invalid arithmetic (`100 / "Apple"`). No external project/commit applications found in the source.
|
||
|
||
## 💻 코드 패턴 (Code patterns)
|
||
Access a static Number property (language: JavaScript):
|
||
```javascript
|
||
let x = Number.MAX_VALUE;
|
||
let y = Number.MAX_SAFE_INTEGER;
|
||
```
|
||
Trigger Infinity through overflow:
|
||
```javascript
|
||
let x = 1 / 0;
|
||
let y = -1 / 0;
|
||
```
|
||
Produce NaN through invalid arithmetic:
|
||
```javascript
|
||
let x = 100 / "Apple";
|
||
```
|
||
|
||
## ⚖️ 모순 및 업데이트 (Contradictions & updates)
|
||
No contradictions found in the source.
|
||
|
||
## ✅ 검증 상태 및 신뢰도
|
||
- **상태:** draft
|
||
- **검증 단계:** conceptual (실제 적용 사례 발견 시 applied/validated로 승격 가능)
|
||
- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body)
|
||
- **신뢰 점수:** 0.88
|
||
- **중복 검사 결과:** 신규 생성 (New discovery)
|
||
|
||
## 🔗 지식 그래프 (Knowledge Graph)
|
||
- **상위/루트:** [[JavaScript Tutorial]]
|
||
- **관련 개념:** [[JavaScript Numbers]], [[JavaScript Number Methods]], [[JavaScript BigInt]], [[JavaScript Bitwise]]
|
||
- **참조 맥락:** Referenced when checking numeric limits, detecting overflow, or guarding against unsafe integers.
|
||
|
||
## 📚 출처 (Sources)
|
||
- [S1] W3Schools — JavaScript Number Properties — https://www.w3schools.com/js/js_number_properties.asp
|
||
|
||
## 📝 변경 이력 (Change history)
|
||
- 2026-06-23: Initial draft synthesized from the W3Schools "JavaScript Number Properties" page (Astra wiki-curation, P-Reinforce v3.1 format).
|