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 --- .../global_objects/array/entries/index.html | 2 +- .../global_objects/array/flatmap/index.html | 26 +++++++++++----------- .../reference/global_objects/array/from/index.html | 2 +- .../global_objects/array/reduce/index.html | 3 ++- .../global_objects/date/getday/index.html | 3 ++- .../reference/global_objects/decodeuri/index.html | 2 +- .../global_objects/decodeuricomponent/index.html | 2 +- .../reference/global_objects/encodeuri/index.html | 9 ++++---- .../global_objects/encodeuricomponent/index.html | 5 +++-- 9 files changed, 29 insertions(+), 25 deletions(-) (limited to 'files/ko/web/javascript/reference/global_objects') diff --git a/files/ko/web/javascript/reference/global_objects/array/entries/index.html b/files/ko/web/javascript/reference/global_objects/array/entries/index.html index 71d7c8d48f..e196886b38 100644 --- a/files/ko/web/javascript/reference/global_objects/array/entries/index.html +++ b/files/ko/web/javascript/reference/global_objects/array/entries/index.html @@ -64,7 +64,7 @@ for (let e of iterator) { -

브라우저 호환성

+

브라우저 호환성

diff --git a/files/ko/web/javascript/reference/global_objects/array/flatmap/index.html b/files/ko/web/javascript/reference/global_objects/array/flatmap/index.html index 93d92580b8..3e85dde980 100644 --- a/files/ko/web/javascript/reference/global_objects/array/flatmap/index.html +++ b/files/ko/web/javascript/reference/global_objects/array/flatmap/index.html @@ -49,13 +49,13 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Array/flatMap

mapflatMap

-
let arr1 = [1, 2, 3, 4];
+
let arr1 = [1, 2, 3, 4];
 
-arr1.map(x => [x * 2]);
+arr1.map(x => [x * 2]);
 // [[2], [4], [6], [8]]
 
-arr1.flatMap(x => [x * 2]);
-// [2, 4, 6, 8]
+arr1.flatMap(x => [x * 2]);
+// [2, 4, 6, 8]
 
 // 한 레벨만 평탄화됨
 arr1.flatMap(x => [[x * 2]]);
@@ -71,8 +71,8 @@ arr1.flatMap(x => [[x * 2]]);
 arr1.map(x=>x.split(" "));
 // [["it's","Sunny","in"],[""],["California"]]
 
-arr1.flatMap(x => x.split(" "));
-// ["it's","Sunny","in","California"]
+arr1.flatMap(x => x.split(" ")); +// ["it's","Sunny","in","California"]

출력 리스트의 길이는 입력 리스트의 길이와 다를 수 있습니다.

@@ -93,21 +93,21 @@ a.flatMap( (n) => // expected output: [4, 1, 4, 20, 16, 1, 18] -
//=> [1, 2, 3, 4, 5, 6, 7, 8, 9]
+
//=> [1, 2, 3, 4, 5, 6, 7, 8, 9]

대안

reduceconcat

-
var arr1 = [1, 2, 3, 4];
-
-arr1.flatMap(x => [x * 2]);
+
var arr1 = [1, 2, 3, 4];
+
+arr1.flatMap(x => [x * 2]);
 // 다음과 동일합니다
-arr1.reduce((acc, x) => acc.concat([x * 2]), []);
-// [2, 4, 6, 8]
+arr1.reduce((acc, x) => acc.concat([x * 2]), []);
+// [2, 4, 6, 8]
 
-
//=> [1, 2, 3, 4, 5, 6, 7, 8, 9]
+
//=> [1, 2, 3, 4, 5, 6, 7, 8, 9]

명세

diff --git a/files/ko/web/javascript/reference/global_objects/array/from/index.html b/files/ko/web/javascript/reference/global_objects/array/from/index.html index 1f0a5776ba..ecebfcc96d 100644 --- a/files/ko/web/javascript/reference/global_objects/array/from/index.html +++ b/files/ko/web/javascript/reference/global_objects/array/from/index.html @@ -23,7 +23,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Array/from
Array.from(arrayLike[, mapFn[, thisArg]])
 
-

매개변수

+

매개변수

arrayLike
diff --git a/files/ko/web/javascript/reference/global_objects/array/reduce/index.html b/files/ko/web/javascript/reference/global_objects/array/reduce/index.html index 94e1d322a4..d9bd819489 100644 --- a/files/ko/web/javascript/reference/global_objects/array/reduce/index.html +++ b/files/ko/web/javascript/reference/global_objects/array/reduce/index.html @@ -12,7 +12,8 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Array/Reduce ---
{{JSRef}}
-

reduce() 메서드는 배열의 각 요소에 대해 주어진 리듀서(reducer) 함수를 실행하고, 하나의 결과값을 반환합니다.

+

reduce() 메서드는 배열의 각 요소에 대해 주어진 리듀서(reducer) 함수를 실행하고, 하나의 결과값을 반환합니다.

+
{{EmbedInteractiveExample("pages/js/array-reduce.html")}}
diff --git a/files/ko/web/javascript/reference/global_objects/date/getday/index.html b/files/ko/web/javascript/reference/global_objects/date/getday/index.html index f671068f12..2520b6e30b 100644 --- a/files/ko/web/javascript/reference/global_objects/date/getday/index.html +++ b/files/ko/web/javascript/reference/global_objects/date/getday/index.html @@ -11,7 +11,8 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Date/getDay ---
{{JSRef}}
-

getDay() 메서드는 주어진 날짜의 현지 시간 기준 요일을 반환합니다. 0은 일요일을 나타냅니다. 현재의 일을 반환하려면 {{jsxref("Date.prototype.getDate()")}}를 사용하세요.

+

getDay() 메서드는 주어진 날짜의 현지 시간 기준 요일을 반환합니다. 0은 일요일을 나타냅니다. 현재의 일을 반환하려면 {{jsxref("Date.prototype.getDate()")}}를 사용하세요.

+
{{EmbedInteractiveExample("pages/js/date-getday.html")}}
diff --git a/files/ko/web/javascript/reference/global_objects/decodeuri/index.html b/files/ko/web/javascript/reference/global_objects/decodeuri/index.html index 7e980efb4c..e5bd19d7fb 100644 --- a/files/ko/web/javascript/reference/global_objects/decodeuri/index.html +++ b/files/ko/web/javascript/reference/global_objects/decodeuri/index.html @@ -34,7 +34,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/decodeURI

설명

-

암호화된 URI의 각 이스케이프 시퀀스(확장문자열)를 자신을 나타내는 문자로 바꾸지만 {{jsxref ( "encodeURI")}}에서 도입할 수 없었던 이스케이프 시퀀스는 해독하지 않습니다. "#"문자는 이스케이프 시퀀스에서 해독되지 않습니다.

+

암호화된 URI의 각 이스케이프 시퀀스(확장문자열)를 자신을 나타내는 문자로 바꾸지만 {{jsxref ( "encodeURI")}}에서 도입할 수 없었던 이스케이프 시퀀스는 해독하지 않습니다. "#"문자는 이스케이프 시퀀스에서 해독되지 않습니다.

예제

diff --git a/files/ko/web/javascript/reference/global_objects/decodeuricomponent/index.html b/files/ko/web/javascript/reference/global_objects/decodeuricomponent/index.html index 6cae8361ae..cec06b85a9 100644 --- a/files/ko/web/javascript/reference/global_objects/decodeuricomponent/index.html +++ b/files/ko/web/javascript/reference/global_objects/decodeuricomponent/index.html @@ -31,7 +31,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/decodeURIComponent

예외

-

잘못 사용되었을 경우 {{jsxref ( "URIError")}} ( " malformed URI sequence ") 예외를 발생시킵니다.

+

잘못 사용되었을 경우 {{jsxref ( "URIError")}} ( " malformed URI sequence ") 예외를 발생시킵니다.

설명

diff --git a/files/ko/web/javascript/reference/global_objects/encodeuri/index.html b/files/ko/web/javascript/reference/global_objects/encodeuri/index.html index 1345eb329e..1db8956f6d 100644 --- a/files/ko/web/javascript/reference/global_objects/encodeuri/index.html +++ b/files/ko/web/javascript/reference/global_objects/encodeuri/index.html @@ -10,7 +10,8 @@ translation_of: Web/JavaScript/Reference/Global_Objects/encodeURI ---
{{jsSidebar("Objects")}}
-

encodeURI() 함수는 {{glossary("URI")}}의 특정한 문자를 UTF-8로 인코딩해 하나, 둘, 셋, 혹은 네 개의 연속된 이스케이프 문자로 나타냅니다. (두 개의 대리 문자로 이루어진 문자만 이스케이프 문자 네 개로 변환됩니다.)

+

encodeURI() 함수는 {{glossary("URI")}}의 특정한 문자를 UTF-8로 인코딩해 하나, 둘, 셋, 혹은 네 개의 연속된 이스케이프 문자로 나타냅니다. (두 개의 대리 문자로 이루어진 문자만 이스케이프 문자 네 개로 변환됩니다.)

+
{{EmbedInteractiveExample("pages/js/globalprops-encodeuri.html")}}
@@ -33,11 +34,11 @@ translation_of: Web/JavaScript/Reference/Global_Objects/encodeURI

설명

-

encodeURI() 함수는 URI에서 특별한 뜻을 가진 문자(예약 문자)는 인코딩 하지 않습니다. 아래 예제는 "URI 도식"이 포함할 수 있는 모든 부분을 담고 있습니다. 일부 문자가 어떤 방식으로 특별한 의미를 주입하고 있는지 잘 살펴보세요.

+

encodeURI() 함수는 URI에서 특별한 뜻을 가진 문자(예약 문자)는 인코딩 하지 않습니다. 아래 예제는 "URI 도식"이 포함할 수 있는 모든 부분을 담고 있습니다. 일부 문자가 어떤 방식으로 특별한 의미를 주입하고 있는지 잘 살펴보세요.

http://username:password@www.example.com:80/path/to/file.php?foo=316&bar=this+has+spaces#anchor
-

따라서 encodeURI()는 완전한 URI를 형성하는데 필요한 문자는 인코딩 하지 않습니다. 또한, 예약된 목적을 가지지는 않지만 URI가 그대로 포함할 수 있는 몇 가지 문자("비예약 표식")도 인코딩 하지 않습니다. (RFC 2396을 참고하세요)

+

따라서 encodeURI()는 완전한 URI를 형성하는데 필요한 문자는 인코딩 하지 않습니다. 또한, 예약된 목적을 가지지는 않지만 URI가 그대로 포함할 수 있는 몇 가지 문자("비예약 표식")도 인코딩 하지 않습니다. (RFC 2396을 참고하세요)

encodeURI() 는 다음 문자를 제외한 문자를 이스케이프 합니다.

@@ -65,7 +66,7 @@ console.log(encodeURIComponent(set3)); // ABC%20abc%20123 (공백은 %20으로

encodeURI() 혼자서는 {{domxref("XMLHttpRequest")}} 등이 사용할, 적합한 HTTP {{httpmethod("GET")}}과 {{httpmethod("POST")}} 요청을 구성할 수 없습니다. GETPOST에서 특별한 문자로 취급하는 "&", "+", "="를 인코딩 하지 않기 때문입니다. 그러나 encodeURIComponent()는 저 세 문자도 인코딩 대상에 포함합니다.

-

상위-하위 쌍을 이루지 않은 단일 대리 문자를 인코딩 시도하면 {{jsxref("URIError")}}가 발생합니다.

+

상위-하위 쌍을 이루지 않은 단일 대리 문자를 인코딩 시도하면 {{jsxref("URIError")}}가 발생합니다.

// high-low pair ok
 console.log(encodeURIComponent('\uD800\uDFFF'));
diff --git a/files/ko/web/javascript/reference/global_objects/encodeuricomponent/index.html b/files/ko/web/javascript/reference/global_objects/encodeuricomponent/index.html
index 3208e449d3..287c7f1f42 100644
--- a/files/ko/web/javascript/reference/global_objects/encodeuricomponent/index.html
+++ b/files/ko/web/javascript/reference/global_objects/encodeuricomponent/index.html
@@ -9,7 +9,8 @@ translation_of: Web/JavaScript/Reference/Global_Objects/encodeURIComponent
 ---
 
{{jsSidebar("Objects")}}
-

encodeURIComponent() 함수는 {{glossary("URI")}}의 특정한 문자를 UTF-8로 인코딩해 하나, 둘, 셋, 혹은 네 개의 연속된 이스케이프 문자로 나타냅니다. (두 개의 대리 문자로 이루어진 문자만 이스케이프 문자 네 개로 변환됩니다.)

+

encodeURIComponent() 함수는 {{glossary("URI")}}의 특정한 문자를 UTF-8로 인코딩해 하나, 둘, 셋, 혹은 네 개의 연속된 이스케이프 문자로 나타냅니다. (두 개의 대리 문자로 이루어진 문자만 이스케이프 문자 네 개로 변환됩니다.)

+
{{EmbedInteractiveExample("pages/js/globalprops-encodeuricomponent.html")}}
@@ -58,7 +59,7 @@ console.log(encodeURIComponent(set3)); // %23 console.log(encodeURIComponent(set4)); // ABC%20abc%20123 (the space gets encoded as %20)
-

상위-하위 쌍을 이루지 않은 단일 대리 문자를 인코딩 시도하면 {{jsxref("URIError")}}가 발생합니다.

+

상위-하위 쌍을 이루지 않은 단일 대리 문자를 인코딩 시도하면 {{jsxref("URIError")}}가 발생합니다.

// high-low pair ok
 console.log(encodeURIComponent('\uD800\uDFFF'));
-- 
cgit v1.2.3-54-g00ecf