From c5e82bf41f336a59704ee8c429e3147f73fa8a48 Mon Sep 17 00:00:00 2001 From: 3indblown Leaf <69508345+kraccoon-dev@users.noreply.github.com> Date: Wed, 16 Feb 2022 17:11:01 +0900 Subject: remove all span tags 1 (#3920) Co-authored-by: Kyle --- .../guide/details_of_the_object_model/index.html | 2 +- files/ko/web/javascript/guide/functions/index.html | 44 +++++++++++----------- files/ko/web/javascript/guide/index.html | 30 +++++++-------- .../javascript/guide/numbers_and_dates/index.html | 2 +- .../regular_expressions/assertions/index.html | 8 ++-- .../guide/regular_expressions/index.html | 4 +- .../javascript/guide/text_formatting/index.html | 16 ++++---- .../web/javascript/guide/using_promises/index.html | 2 +- 8 files changed, 54 insertions(+), 54 deletions(-) (limited to 'files/ko/web/javascript/guide') diff --git a/files/ko/web/javascript/guide/details_of_the_object_model/index.html b/files/ko/web/javascript/guide/details_of_the_object_model/index.html index d81d17d13f..d43c8951e0 100644 --- a/files/ko/web/javascript/guide/details_of_the_object_model/index.html +++ b/files/ko/web/javascript/guide/details_of_the_object_model/index.html @@ -299,7 +299,7 @@ mark.projects = ["navigator"];

위의 구문을 실행한 직후, mark객체는 "none"이라는 값을 가지는 전문분야(specialty)속성을 가지게 됩니다.아래의 그림들은 해당 속성을 추가한 후 엔지니어(Engineer) 프로토타입에 대해 해당 속성을 재정의 했을 경우 각 객체에 미치는 영향을 보여줍니다.


- 속성의 추가

+ 속성의 추가

좀 더 유연한 생성자들

diff --git a/files/ko/web/javascript/guide/functions/index.html b/files/ko/web/javascript/guide/functions/index.html index ce931d69b4..34cc014ae9 100644 --- a/files/ko/web/javascript/guide/functions/index.html +++ b/files/ko/web/javascript/guide/functions/index.html @@ -77,19 +77,19 @@ console.log(factorial(3));

다음 코드에서, 함수 표현식으로 정의된 함수를 인자로 받아, 2번 째 인자인 배열의 모든 요소에 대해 그 함수를 실행합니다.

-
function map(f, a) {
-  var result = []; // Create a new Array
-  var i; // Declare variable
-  for (i = 0; i != a.length; i++)
-    result[i] = f(a[i]);
-      return result;
-}
-var f = function(x) {
-   return x * x * x;
-}
-var numbers = [0, 1, 2, 5, 10];
-var cube = map(f,numbers);
-console.log(cube);
+
function map(f, a) {
+  var result = []; // Create a new Array
+  var i; // Declare variable
+  for (i = 0; i != a.length; i++)
+    result[i] = f(a[i]);
+      return result;
+}
+var f = function(x) {
+   return x * x * x;
+}
+var numbers = [0, 1, 2, 5, 10];
+var cube = map(f,numbers);
+console.log(cube);

함수는 [0, 1, 8, 125, 1000] 을 반환합니다.

@@ -217,7 +217,7 @@ getScore(); // Returns "Chamahk scored 5"
  • foo()
  • -

    자신을 호출하는 함수를 재귀 함수라고 합니다. 어떤 면에서, 재귀는 루프와 유사합니다. 둘 다 동일한 코드를 여러 번 실행하고, 조건(무한 루프를 방지하거나, 이 경우에는 오히려 무한 재귀하는)을 요구합니다. 예를 들어, 다음 루프는:

    +

    자신을 호출하는 함수를 재귀 함수라고 합니다. 어떤 면에서, 재귀는 루프와 유사합니다. 둘 다 동일한 코드를 여러 번 실행하고, 조건(무한 루프를 방지하거나, 이 경우에는 오히려 무한 재귀하는)을 요구합니다. 예를 들어, 다음 루프는:

    var x = 0;
     while (x < 10) { // "x < 10" is the loop condition
    @@ -354,7 +354,7 @@ A(1); // logs 6 (1 + 2 + 3)
     
     

    이름 충돌

    -

    클로저의 범위에서 두 개의 인수 또는 변수의 이름이 같은 경우, 이름 충돌이 있습니다. 더 안쪽 범위가 우선순위를 갖습니다. 그래서 가장 바깥 범위는 우선순위가 가장 낮은 반면에, 가장 안쪽 범위는 가장 높은 우선순위를 갖습니다. 이것이 범위 체인(scope chaini)입니다. 체인에서 첫번째는 가장 안쪽 범위이고, 마지막 가장 바깥 쪽의 범위입니다. 다음 사항을 고려하세요:

    +

    클로저의 범위에서 두 개의 인수 또는 변수의 이름이 같은 경우, 이름 충돌이 있습니다. 더 안쪽 범위가 우선순위를 갖습니다. 그래서 가장 바깥 범위는 우선순위가 가장 낮은 반면에, 가장 안쪽 범위는 가장 높은 우선순위를 갖습니다. 이것이 범위 체인(scope chaini)입니다. 체인에서 첫번째는 가장 안쪽 범위이고, 마지막은 가장 바깥 쪽의 범위입니다. 다음 사항을 고려하세요:

    function outside() {
       var x = 10;
    @@ -587,15 +587,15 @@ var p = new Person();

    화살표 함수에는 this;가 없습니다. 화살표 함수를 포함하는 객체 값이 사용됩니다. 따라서 다음 코드에서 setInterval에 전달 된 함수 내의 this 값은 화살표 함수를 둘러싼 함수의 this와 같은 값을 갖습니다.

    -
    function Person() {
    -  this.age = 0;
    +
    function Person() {
    +  this.age = 0;
     
    -  setInterval(() => {
    -    this.age++; // |this| properly refers to the person object
    -  }, 1000);
    -}
    +  setInterval(() => {
    +    this.age++; // |this| properly refers to the person object
    +  }, 1000);
    +}
     
    -var p = new Person();
    +var p = new Person();

    미리 정의된 함수들

    diff --git a/files/ko/web/javascript/guide/index.html b/files/ko/web/javascript/guide/index.html index 85c38e4c45..7ea4e58ad4 100644 --- a/files/ko/web/javascript/guide/index.html +++ b/files/ko/web/javascript/guide/index.html @@ -17,7 +17,7 @@ translation_of: Web/JavaScript/Guide

    본 안내서는 여러 장으로 구성되어 있습니다.

    {{jsxref("String.trim", "trim")}} - 문자열의 시작과 끝에서 공백을 자릅니다. + 문자열의 시작과 끝에서 공백을 자릅니다. @@ -172,7 +172,7 @@ mystring[0]; // This returns "H"

    템플릿 문자열은 포함 식을 용납하는 문자열 리터럴입니다. 여러분은 그것들과 함께 다중 선 문자열 및 문자열 보간 기능을 사용할 수 있습니다.

    -

    템플릿 문자열은 작은따옴표나 큰따옴표 대신에 back-tick (` `) (grave accent)문자로 묶습니다. 템플릿 문자열은 자리 표시자를 포함 할 수 있습니다. 이들은 달러 기호 중괄호로 표시됩니다.  (${expression})

    +

    템플릿 문자열은 작은따옴표나 큰따옴표 대신에 back-tick (` `) (grave accent)문자로 묶습니다. 템플릿 문자열은 자리 표시자를 포함 할 수 있습니다. 이들은 달러 기호와 중괄호로 표시됩니다.  (${expression})

    다중 선

    diff --git a/files/ko/web/javascript/guide/using_promises/index.html b/files/ko/web/javascript/guide/using_promises/index.html index 953929fe28..53dbb7a00f 100644 --- a/files/ko/web/javascript/guide/using_promises/index.html +++ b/files/ko/web/javascript/guide/using_promises/index.html @@ -31,7 +31,7 @@ translation_of: Web/JavaScript/Guide/Using_promises

    만약 createAudioFileAsync() 함수가 Promise를 반환해주도록 수정해본다면, 다음과 같이 간단하게 사용되어질 수 있습니다.

    -
    createAudioFileAsync(audioSettings).then(successCallback, failureCallback);
    +
    createAudioFileAsync(audioSettings).then(successCallback, failureCallback);

    …조금 더 간단하게 써보자면:

    -- cgit v1.2.3-54-g00ecf