docs(10_Wiki): Dev 폴더 누락분 반영 — Topic_Programming으로 통합

이전 재구성 작업에서 Dev/ 폴더가 누락되었던 것을 반영.

- Dev/Topic_Programming(중첩 폴더, 78개)은 Dev 자체 최상위 폴더들
  (Architecture/Conventions/Engineering_Intelligence 등)과 완전 중복이라 제거.
- Dev 최상위 엔지니어링 지식 폴더(Architecture/Conventions/Engineering_Intelligence/
  Failure_Library/Generalized_Principles/Language/Pattern_Catalog/Platform_Guides/
  Subsystems, 77개)는 이미 Topic_Programming/Topic_Programming에 더 최신 버전이
  존재해 중복 제거(고유 콘텐츠 1개는 예외 처리하여 이동 보존).
- Dev의 W3Schools 언어 튜토리얼 폴더(Topic_C/CPP/CSS/CSharp/HOWTO/HTML/Java/
  JavaScript/PHP/Python/SQL/W3CSS, 1201개)는 전부 Topic_Programming 하위로 이동.
- 에이전트 운영 상태(.astra/docs)는 그대로 유지, 콘텐츠 폴더만 정리.
- Topic_Programming 최종 문서 수: 2784 → 3985.
This commit is contained in:
Antigravity Agent
2026-07-05 00:39:13 +09:00
parent 9148c358d0
commit e9cbf23ab5
1356 changed files with 0 additions and 12831 deletions
@@ -0,0 +1,190 @@
---
id: javascript-operators
title: "JavaScript Operators"
category: "Frontend"
status: "draft"
verification_status: "conceptual"
canonical_id: ""
aliases: ["JS operators", "JavaScript operator types", "arithmetic operators", "assignment operators", "comparison operators", "logical operators", "concatenation operator"]
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", "operators"]
raw_sources: ["https://www.w3schools.com/js/js_operators.asp"]
applied_in: []
github_commit: ""
---
# [[JavaScript Operators]]
## 🎯 한 줄 통찰 (One-line insight)
JavaScript operators are used for mathematical and logical computations — the `=` assigns, `+` adds (and concatenates strings), `*` multiplies, and comparison/logical operators evaluate conditions. [S1]
## 🧠 핵심 개념 (Core concepts)
- **Operators are for mathematical and logical computations** — they perform operations on values and variables. [S1]
- **Four core single examples** — the assignment operator `=` assigns values, the addition operator `+` adds, the multiplication operator `*` multiplies, and the comparison operator `>` compares. [S1]
- **Operator categories** — JavaScript operators include Arithmetic, Assignment, Comparison, Logical, and String operators. [S1]
- **`+` is overloaded** — when used on strings, the `+` operator is called the concatenation operator; if you add a number and a string, the result is a string. [S1]
- **Comparisons return booleans** — comparison operators always return `true` or `false`, and strings are compared alphabetically. [S1]
## 🧩 추출된 패턴 (Extracted patterns)
- **Compute into a new variable** — combine two operands with an arithmetic operator and store the result: `let z = x + y;`. [S1]
- **Compound assignment** — `x += 5` is shorthand for `x = x + 5`. [S1]
- **Concatenate then assign** — build a string with `+` and a separator: `text1 + " " + text2`. [S1]
## 📖 세부 내용 (Details)
**Operators are for Mathematical and Logical Computations** [S1]
The assignment operator (`=`) assigns a value to a variable:
```javascript
let x = 10;
```
The addition operator (`+`) adds values:
```javascript
let x = 5;
let y = 2;
let z = x + y;
```
The multiplication operator (`*`) multiplies values:
```javascript
let x = 5;
let y = 2;
let z = x * y;
```
A more complex expression mixing addition and multiplication: [S1]
```javascript
let a = 3;
let x = (100 + 50) * a;
```
**Types of JavaScript Operators** [S1]
There are different types of JavaScript operators: Arithmetic, Assignment, Comparison, String, Logical, and others.
**JavaScript Arithmetic Operators** [S1]
Arithmetic operators are used to perform arithmetic on numbers:
| Operator | Description |
|----------|-------------|
| + | Addition |
| - | Subtraction |
| * | Multiplication |
| ** | Exponentiation |
| / | Division |
| % | Modulus (Division Remainder) |
| ++ | Increment |
| -- | Decrement |
**JavaScript String Addition** [S1]
When used on strings, the `+` operator is called the concatenation operator:
```javascript
let text1 = "John";
let text2 = "Doe";
let text3 = text1 + " " + text2;
```
The `+=` assignment operator can also concatenate:
```javascript
let text1 = "What a very ";
text1 += "nice day";
```
**Adding Strings and Numbers** [S1]
If you add a number and a string, the result will be a string:
```javascript
let x = 5 + 5;
let y = "5" + 5;
let z = "Hello" + 5;
```
**JavaScript Assignment Operators** [S1]
Assignment operators assign values to JavaScript variables. For example, `x += 5` is the same as `x = x + 5`:
```javascript
let x = 10;
x += 5;
```
| Operator | Example | Same As |
|----------|---------|---------|
| = | x = y | x = y |
| += | x += y | x = x + y |
| -= | x -= y | x = x - y |
| *= | x *= y | x = x * y |
| /= | x /= y | x = x / y |
| %= | x %= y | x = x % y |
| **= | x **= y | x = x ** y |
**JavaScript Comparison Operators** [S1]
Comparison operators always return `true` or `false`:
```javascript
let x = 5;
let result = x > 8;
```
| Operator | Description | Example |
|----------|-------------|---------|
| == | equal to | x == 5 |
| === | equal value and equal type | x === 5 |
| != | not equal | x != 5 |
| !== | not equal value or not equal type | x !== 5 |
| > | greater than | x > 5 |
| < | less than | x < 5 |
| >= | greater than or equal to | x >= 5 |
| <= | less than or equal to | x <= 5 |
Strings are compared alphabetically: [S1]
```javascript
let text1 = "A";
let text2 = "B";
let result = text1 < text2;
```
**JavaScript Logical Operators** [S1]
| Operator | Description |
|----------|-------------|
| && | logical and |
| \|\| | logical or |
| ! | logical not |
## 🛠️ 적용 사례 (Applied in summary)
The page's own snippets are the canonical applied examples — assigning with `=`, computing with `+`/`*`, concatenating strings, compound-assigning with `+=`, and comparing values/strings. No external project/commit applications found in the source.
## 💻 코드 패턴 (Code patterns)
Compute and store a result:
```javascript
let x = 5;
let y = 2;
let z = x + y;
```
Concatenate strings with a separator:
```javascript
let text3 = text1 + " " + text2;
```
Compound assignment:
```javascript
let x = 10;
x += 5;
```
## ⚖️ 모순 및 업데이트 (Contradictions & updates)
No contradictions found in the source. The behavior that `"5" + 5` yields a string (`"55"`) rather than `10` is intentional, not a contradiction — `+` concatenates when a string operand is present.
## ✅ 검증 상태 및 신뢰도
- **상태:** draft
- **검증 단계:** conceptual (실제 적용 사례 발견 시 applied/validated로 승격 가능)
- **출처 신뢰도:** B (W3Schools — widely used educational reference, not a primary standards body)
- **신뢰 점수:** 0.88
- **중복 검사 결과:** 신규 생성 (New discovery)
## 🔗 지식 그래프 (Knowledge Graph)
- **상위/루트:** [[JavaScript Tutorial]]
- **관련 개념:** [[JavaScript Arithmetic]], [[JavaScript Assignment]], [[JavaScript Comparisons]], [[JavaScript Types]]
- **참조 맥락:** The umbrella reference for the operator-family pages (arithmetic, assignment, comparison, logical) that follow it.
## 📚 출처 (Sources)
- [S1] W3Schools — JavaScript Operators — https://www.w3schools.com/js/js_operators.asp
## 📝 변경 이력 (Change history)
- 2026-06-23: Initial draft synthesized from the W3Schools "JavaScript Operators" page (Astra wiki-curation, P-Reinforce v3.1 format).