From 86792571ae1a21a1e4bf526747d6dd1c2636d167 Mon Sep 17 00:00:00 2001 From: alattalatta Date: Sat, 14 Aug 2021 15:57:42 +0900 Subject: Clean up JS reference documents (#1818) * Clean up JavaScript references HTML code - Remove inline styles - Remove elements - Remove title attribute * Remove sup/sub from JavaScript reference * Remove name attrs from JavaScript reference * Remove legacy browser compat elements * Remove duplicate browser-compat key --- .../web/javascript/reference/operators/async_function/index.html | 7 +++---- files/ko/web/javascript/reference/operators/class/index.html | 2 +- files/ko/web/javascript/reference/operators/delete/index.html | 3 ++- .../reference/operators/destructuring_assignment/index.html | 4 ++-- files/ko/web/javascript/reference/operators/function/index.html | 2 +- files/ko/web/javascript/reference/operators/index.html | 8 ++++---- .../javascript/reference/operators/object_initializer/index.html | 6 +++--- .../javascript/reference/operators/operator_precedence/index.html | 6 +++--- .../javascript/reference/operators/property_accessors/index.html | 2 +- files/ko/web/javascript/reference/operators/this/index.html | 4 ++-- 10 files changed, 22 insertions(+), 22 deletions(-) (limited to 'files/ko/web/javascript/reference/operators') diff --git a/files/ko/web/javascript/reference/operators/async_function/index.html b/files/ko/web/javascript/reference/operators/async_function/index.html index d1ec146ca4..fda50e9a4a 100644 --- a/files/ko/web/javascript/reference/operators/async_function/index.html +++ b/files/ko/web/javascript/reference/operators/async_function/index.html @@ -1,13 +1,14 @@ --- title: async function 표현식 slug: Web/JavaScript/Reference/Operators/async_function +browser-compat: javascript.operators.async_function translation_of: Web/JavaScript/Reference/Operators/async_function ---
{{jsSidebar("Operators")}}

async function 키워드는 표현식 내에서 async 함수를 정의하기 위해 사용됩니다.

-

또한 async function statement을 사용하여 async 함수를 정의할 수 있습니다.

+

또한 async function statement을 사용하여 async 함수를 정의할 수 있습니다.

문법

@@ -83,9 +84,7 @@ add(10).then(v => {

Browser compatibility

-
{{Compat("javascript.operators.async_function_expression")}} 
- -
+
{{Compat}}

See also

diff --git a/files/ko/web/javascript/reference/operators/class/index.html b/files/ko/web/javascript/reference/operators/class/index.html index d15b532fbc..6ac133bf39 100644 --- a/files/ko/web/javascript/reference/operators/class/index.html +++ b/files/ko/web/javascript/reference/operators/class/index.html @@ -27,7 +27,7 @@ translation_of: Web/JavaScript/Reference/Operators/class

class 식은 class 문과 구문이 비슷합니다. 그러나, class 식의 경우 클래스명("binding identifier")을 생략할 수 있는데 class 문으로는 할 수 없습니다.

-

class 문과 같이, class 식의 본체는 엄격 모드에서 실행됩니다.

+

class 문과 같이, class 식의 본체는 엄격 모드에서 실행됩니다.

diff --git a/files/ko/web/javascript/reference/operators/delete/index.html b/files/ko/web/javascript/reference/operators/delete/index.html index 037c3bcd98..d2eafd97f1 100644 --- a/files/ko/web/javascript/reference/operators/delete/index.html +++ b/files/ko/web/javascript/reference/operators/delete/index.html @@ -6,6 +6,7 @@ tags: - Operator - Property - Reference +browser-compat: javascript.operators.delete translation_of: Web/JavaScript/Reference/Operators/delete ---
{{jsSidebar("Operators")}}
@@ -265,7 +266,7 @@ if (3 in trees) {

브라우저 호환성

-
{{Compat("javascript.operators.delete")}}
+
{{Compat}}

크로스 브라우저 참고사항

diff --git a/files/ko/web/javascript/reference/operators/destructuring_assignment/index.html b/files/ko/web/javascript/reference/operators/destructuring_assignment/index.html index aae1bd3e00..e367513864 100644 --- a/files/ko/web/javascript/reference/operators/destructuring_assignment/index.html +++ b/files/ko/web/javascript/reference/operators/destructuring_assignment/index.html @@ -341,7 +341,7 @@ whois(user); // "jdoe is John"

계산된 속성 이름과 구조 분해

-

계산된 속성 이름(computed property name)은, 객체 리터럴과 비슷하게 구조 분해에도 사용될 수 있습니다.

+

계산된 속성 이름(computed property name)은, 객체 리터럴과 비슷하게 구조 분해에도 사용될 수 있습니다.

let key = "z";
 let { [key]: foo } = { z: "bar" };
@@ -404,6 +404,6 @@ console.log(fizzBuzz); // "true"
 

같이 보기

diff --git a/files/ko/web/javascript/reference/operators/function/index.html b/files/ko/web/javascript/reference/operators/function/index.html index 5f4977bfc7..caa5edbfc0 100644 --- a/files/ko/web/javascript/reference/operators/function/index.html +++ b/files/ko/web/javascript/reference/operators/function/index.html @@ -37,7 +37,7 @@ translation_of: Web/JavaScript/Reference/Operators/function

설명

-

함수 표현식(function expression)은 function 문과 매우 비슷하고 구문(syntax)이 거의 같습니다 (자세한 사항은 function 문 참조). 함수 표현식과 function 문 사이의 주요 차이점은 함수 이름으로, 함수 표현식으로 익명 함수를 만들 경우 이 이름을 생략할 수 있습니다. 함수 표현식은 정의하자마자 실행되는  IIFE (즉시 호출되는 함수 표현식)로 사용될 수 있습니다. 더 자세한 정보는 함수 장 참조.

+

함수 표현식(function expression)은 function 문과 매우 비슷하고 구문(syntax)이 거의 같습니다 (자세한 사항은 function 문 참조). 함수 표현식과 function 문 사이의 주요 차이점은 함수 이름으로, 함수 표현식으로 익명 함수를 만들 경우 이 이름을 생략할 수 있습니다. 함수 표현식은 정의하자마자 실행되는  IIFE (즉시 호출되는 함수 표현식)로 사용될 수 있습니다. 더 자세한 정보는 함수 장 참조.

Function expression 끌어올리기

diff --git a/files/ko/web/javascript/reference/operators/index.html b/files/ko/web/javascript/reference/operators/index.html index 1ddd778228..16133a2db7 100644 --- a/files/ko/web/javascript/reference/operators/index.html +++ b/files/ko/web/javascript/reference/operators/index.html @@ -10,7 +10,7 @@ translation_of: Web/JavaScript/Reference/Operators ---
{{jsSidebar("Operators")}}
-

이 장은 JavaScript의 모든 연산자operator, 식expression 및 키워드를 나열합니다.

+

이 장은 JavaScript의 모든 연산자, 식 및 키워드를 나열합니다.

항목별 식 및 연산자

@@ -28,7 +28,7 @@ translation_of: Web/JavaScript/Reference/Operators
{{JSxRef("Operators/class", "class")}}
class 키워드는 클래스를 정의합니다.
{{JSxRef("Operators/function*", "function*")}}
-
function* 키워드는 생성기generator 함수 식을 정의합니다.
+
function* 키워드는 생성기 함수 식을 정의합니다.
{{JSxRef("Operators/yield", "yield")}}
생성기 함수를 일시정지 및 재개합니다.
{{JSxRef("Operators/yield*", "yield*")}}
@@ -162,14 +162,14 @@ translation_of: Web/JavaScript/Reference/Operators
{{JSxRef("Operators/Inequality", "!=")}}
부등 연산자.
{{JSxRef("Operators/Strict_equality", "===")}}
-
일치identity 연산자.
+
일치 연산자.
{{JSxRef("Operators/Strict_inequality", "!==")}}
불일치 연산자.

비트 시프트 연산자

-

피연산자의 모든 비트를 이동shift하는 연산.

+

피연산자의 모든 비트를 시프트하는 연산.

{{JSxRef("Operators/Left_shift", "<<")}}
diff --git a/files/ko/web/javascript/reference/operators/object_initializer/index.html b/files/ko/web/javascript/reference/operators/object_initializer/index.html index 3a4bb219af..b3bebf8541 100644 --- a/files/ko/web/javascript/reference/operators/object_initializer/index.html +++ b/files/ko/web/javascript/reference/operators/object_initializer/index.html @@ -90,7 +90,7 @@ var o = {

속성 접근

-

일단 객체를 생성하면, 읽거나 바꿀 수 있습니다. 객체 속성은 점 표기법 또는 각괄호 표기법을 사용하여 액세스될 수 있습니다. (자세한 사항은 속성 접근자 참조.)

+

일단 객체를 생성하면, 읽거나 바꿀 수 있습니다. 객체 속성은 점 표기법 또는 각괄호 표기법을 사용하여 액세스될 수 있습니다. (자세한 사항은 속성 접근자 참조.)

object.foo; // "bar"
 object["age"]; // 42
@@ -185,7 +185,7 @@ var o = {
 
 

계산된 속성명

-

ECMAScript 2015를 시작으로, 객체 초기화 구문은 계산된 속성명(computed property name)도 지원합니다. 각괄호 [] 안에 식을 넣을 수 있고, 식이 계산되고 그 결과가 속성명으로 사용됩니다. 이는 이미 속성을 읽고 설정하는 데 사용했을 수 있는 속성 접근자 구문의 각괄호 표기법을 연상시킵니다.  

+

ECMAScript 2015를 시작으로, 객체 초기화 구문은 계산된 속성명(computed property name)도 지원합니다. 각괄호 [] 안에 식을 넣을 수 있고, 식이 계산되고 그 결과가 속성명으로 사용됩니다. 이는 이미 속성을 읽고 설정하는 데 사용했을 수 있는 속성 접근자 구문의 각괄호 표기법을 연상시킵니다.  

이제 당신은 객체 리터럴에서도 같은 구문을 쓸 수 있습니다:

@@ -288,5 +288,5 @@ assert(obj3.__proto__ === 17);
  • 속성 접근자
  • get / set
  • 메서드 정의
  • -
  • 어휘 문법
  • +
  • 어휘 문법
  • diff --git a/files/ko/web/javascript/reference/operators/operator_precedence/index.html b/files/ko/web/javascript/reference/operators/operator_precedence/index.html index 0d37a262c5..9f9ea86a93 100644 --- a/files/ko/web/javascript/reference/operators/operator_precedence/index.html +++ b/files/ko/web/javascript/reference/operators/operator_precedence/index.html @@ -19,9 +19,9 @@ original_slug: Web/JavaScript/Reference/Operators/연산자_우선순위

    우선순위와 결합성

    -

    아래와 같이 표현할 수 있는 표현식을 생각해 봅시다. 연산자1과 연산자2의 자리에는 아무 연산자를 넣을 수 있습니다.

    +

    아래와 같이 표현할 수 있는 표현식을 생각해 봅시다. 연산자1과 연산자2의 자리에는 아무 연산자를 넣을 수 있습니다.

    -
    a 연산자1 b 연산자2 c
    +
    a 연산자1 b 연산자2 c

    두 연산자의 우선순위(아래 표 참조)가 다를 경우, 우선순위가 높은 연산자가 먼저 실행되고 결합성은 영향을 미치지 않습니다. 아래 예제에서는 덧셈이 곱셈보다 먼저 쓰였음에도 곱셈의 우선순위가 높기 때문에 먼저 실행됩니다.

    @@ -30,7 +30,7 @@ console.log(3 + (10 * 2)); // 23을 출력, 괄호는 불필요함 console.log((3 + 10) * 2); // 26을 출력, 괄호로 인해 실행 순서가 바뀜
    -

    좌결합성(왼쪽에서 오른쪽으로)은 표현식이 (a 연산자1 b) 연산자2 c와 같이, 우결합성(오른쪽에서 왼쪽으로)은 a 연산자1 (b 연산자2 c)와 같이 계산된다는 의미입니다. 대입 연산자는 우결합성이므로 다음과 같은 코드를 작성할 수 있습니다.

    +

    좌결합성(왼쪽에서 오른쪽으로)은 표현식이 (a 연산자1 b) 연산자2 c와 같이, 우결합성(오른쪽에서 왼쪽으로)은 a 연산자1 (b 연산자2 c)와 같이 계산된다는 의미입니다. 대입 연산자는 우결합성이므로 다음과 같은 코드를 작성할 수 있습니다.

    a = b = 5; // a = (b = 5);와 같음
     
    diff --git a/files/ko/web/javascript/reference/operators/property_accessors/index.html b/files/ko/web/javascript/reference/operators/property_accessors/index.html index 83ae2e0b80..790ababd4e 100644 --- a/files/ko/web/javascript/reference/operators/property_accessors/index.html +++ b/files/ko/web/javascript/reference/operators/property_accessors/index.html @@ -93,7 +93,7 @@ console.log(object[bar]);

    메서드 바인딩

    -

    메서드는 해당 메서드의 객체에 바인딩되지 않습니다. 특히 this는 메서드 내에 고정되지 않으므로 this가 항상 현재 메서드를 포함하는 객체를 참조하는건 아닙니다. 대신, this는 함수 호출 방식에 따라 "전달"됩니다. 메서드 바인딩을 참고하세요.

    +

    메서드는 해당 메서드의 객체에 바인딩되지 않습니다. 특히 this는 메서드 내에 고정되지 않으므로 this가 항상 현재 메서드를 포함하는 객체를 참조하는건 아닙니다. 대신, this는 함수 호출 방식에 따라 "전달"됩니다. 메서드 바인딩을 참고하세요.

    eval() 주의사항

    diff --git a/files/ko/web/javascript/reference/operators/this/index.html b/files/ko/web/javascript/reference/operators/this/index.html index bc27366762..e74032c1c6 100644 --- a/files/ko/web/javascript/reference/operators/this/index.html +++ b/files/ko/web/javascript/reference/operators/this/index.html @@ -28,7 +28,7 @@ translation_of: Web/JavaScript/Reference/Operators/this

    전역 문맥

    -

    전역 실행 문맥global execution context에서 this는 엄격 모드 여부에 관계 없이 전역 객체를 참조합니다.

    +

    전역 실행 맥락에서 this는 엄격 모드 여부에 관계 없이 전역 객체를 참조합니다.

    // 웹 브라우저에서는 window 객체가 전역 객체
     console.log(this === window); // true
    @@ -142,7 +142,7 @@ console.log(o.a, o.f(), o.g(), o.h()); // 37, 37, azerty, azerty

    화살표 함수

    -

    화살표 함수에서 this는 자신을 감싼 정적 범위lexical context입니다. 전역 코드에서는 전역 객체를 가리킵니다.

    +

    화살표 함수에서 this는 자신을 감싼 정적 범위입니다. 전역 코드에서는 전역 객체를 가리킵니다.

    var globalObject = this;
     var foo = (() => this);
    -- 
    cgit v1.2.3-54-g00ecf