From d989d4321ed080cc581e9e2f9ff244db819c8b6f Mon Sep 17 00:00:00 2001 From: Yoon Yeom Date: Thu, 3 Jun 2021 20:42:18 +0900 Subject: Update index.html (#1097) correct spacing --- .../web/javascript/reference/global_objects/array/from/index.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'files/ko') 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 487cc36848..537384cf56 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 @@ -12,7 +12,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Array/from ---
{{JSRef}}
-

Array.from() 메서드는 유사 배열 객체(array-like object)나반복 가능한 객체(iterable object)를 얕게 복사해새로운Array 객체를 만듭니다.

+

Array.from() 메서드는 유사 배열 객체(array-like object)나 반복 가능한 객체(iterable object)를 얕게 복사해 새로운Array 객체를 만듭니다.

{{EmbedInteractiveExample("pages/js/array-from.html")}}
@@ -43,11 +43,11 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Array/from

다음과 같은 경우에 Array.from()으로새Array를 만들 수 있습니다.

-

Array.from()은 선택 매개변수인 mapFn를 가지는데,배열(혹은 배열 서브클래스)의 각 요소를{{jsxref("Array.prototype.map", "맵핑", "", 0)}}할 때 사용할 수 있습니다. 즉,Array.from(obj, mapFn, thisArg)는 중간에 다른 배열을 생성하지 않는다는 점을 제외하면Array.from(obj).map(mapFn, thisArg)와 같습니다. 이 특징은 typed arrays와 같은 특정 배열 서브클래스에서 중간 배열 값이 적절한 유형에 맞게 생략되기 때문에 특히 중요합니다.

+

Array.from()은 선택 매개변수인 mapFn를 가지는데, 배열(혹은 배열 서브클래스)의 각 요소를{{jsxref("Array.prototype.map", "맵핑", "", 0)}}할 때 사용할 수 있습니다. 즉,Array.from(obj, mapFn, thisArg)는 중간에 다른 배열을 생성하지 않는다는 점을 제외하면Array.from(obj).map(mapFn, thisArg)와 같습니다. 이 특징은 typed arrays와 같은 특정 배열 서브클래스에서 중간 배열 값이 적절한 유형에 맞게 생략되기 때문에 특히 중요합니다.

from() 메서드의 length 속성은 1입니다.

@@ -126,7 +126,7 @@ range('A'.charCodeAt(0), 'Z'.charCodeAt(0), 1).map(x => String.fromCharCode(x

폴리필

-

Array.from은 ECMA-262 표준 제6판에 추가됐습니다.따라서 어떤 표준 구현체에서는 사용할 수없을 수도 있습니다. 다른 모든 코드 이전에 아래 코드를 포함하면 지원하지 않는 플랫폼에서도Array.from을사용할 수 있습니다. 아래 알고리즘은ObjectTypeError가 변형되지 않고,callback.call의 계산 값이 원래의Function.prototype.call()과 같은 경우ECMA-262 제6판이 명시한 것과 동일합니다.또한 반복가능자(iterable)는 완벽하게 폴리필할 수없기에 본 구현은 ECMA-262 제6판의 제네릭 반복가능자를 지원하지 않습니다.

+

Array.from은 ECMA-262 표준 제6판에 추가됐습니다.따라서 어떤 표준 구현체에서는 사용할 수 없을 수도 있습니다. 다른 모든 코드 이전에 아래 코드를 포함하면 지원하지 않는 플랫폼에서도Array.from을 사용할 수 있습니다. 아래 알고리즘은ObjectTypeError가 변형되지 않고,callback.call의 계산 값이 원래의Function.prototype.call()과 같은 경우ECMA-262 제6판이 명시한 것과 동일합니다.또한 반복가능자(iterable)는 완벽하게 폴리필 할 수 없기에 본 구현은 ECMA-262 제6판의 제네릭 반복가능자를 지원하지 않습니다.

// Production steps of ECMA-262, Edition 6, 22.1.2.1
 if (!Array.from) {
-- 
cgit v1.2.3-54-g00ecf