From 4289bf1fbb823f410775b4c7d0533b7abd8e5f5f Mon Sep 17 00:00:00 2001 From: 3indblown Leaf <69508345+kraccoon-dev@users.noreply.github.com> Date: Tue, 1 Feb 2022 19:42:11 +0900 Subject: remove class 1 (#3922) --- .../reference/global_objects/object/entries/index.html | 10 +++++----- .../global_objects/object/setprototypeof/index.html | 14 +++++++------- 2 files changed, 12 insertions(+), 12 deletions(-) (limited to 'files/ko/web/javascript/reference/global_objects/object') diff --git a/files/ko/web/javascript/reference/global_objects/object/entries/index.html b/files/ko/web/javascript/reference/global_objects/object/entries/index.html index 3056d99d31..082e931936 100644 --- a/files/ko/web/javascript/reference/global_objects/object/entries/index.html +++ b/files/ko/web/javascript/reference/global_objects/object/entries/index.html @@ -15,7 +15,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Object/entries
Object.entries(obj)+
Object.entries(obj)
기본적으로 지원하지 않는 이전 환경에서 호환 가능한 Object.entries
지원을 추가하려면 tc39/proposal-object-values-entries에 Object.entries의 데모 구현을 찾을 수 있습니다 (IE에 대한 지원이 필요하지 않은 경우) , es-shims/Object.entries 저장소에있는 polyfill을 사용하거나 아래에 나열된 polyfill을 간단하게 배치 할 수 있습니다.
if (!Object.entries) +if (!Object.entries) Object.entries = function( obj ){ var ownProps = Object.keys( obj ), i = ownProps.length, @@ -54,7 +54,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/Object/entriesExamples
-const obj = { foo: 'bar', baz: 42 }; +const obj = { foo: 'bar', baz: 42 }; console.log(Object.entries(obj)); // [ ['foo', 'bar'], ['baz', 42] ] // array like object @@ -94,7 +94,7 @@ console.log(`${key} ${value}`); // "a 5", "b 7", "c 9" -const obj = { foo: 'bar', baz: 42 }; +const obj = { foo: 'bar', baz: 42 }; const map = new Map(Object.entries(obj)); console.log(map); // Map { foo: "bar", baz: 42 }@@ -103,7 +103,7 @@ console.log(map); // Map { foo: "bar", baz: 42 }Array Destructuring을 사용하면 객체를 쉽게 반복 할 수 있습니다.
-const obj = { foo: 'bar', baz: 42 }; +const obj = { foo: 'bar', baz: 42 }; Object.entries(obj).forEach(([key, value]) => console.log(`${key}: ${value}`)); // "foo: bar", "baz: 42"diff --git a/files/ko/web/javascript/reference/global_objects/object/setprototypeof/index.html b/files/ko/web/javascript/reference/global_objects/object/setprototypeof/index.html index 64f7a89a18..4b01abdf50 100644 --- a/files/ko/web/javascript/reference/global_objects/object/setprototypeof/index.html +++ b/files/ko/web/javascript/reference/global_objects/object/setprototypeof/index.html @@ -14,7 +14,7 @@ browser-compat: javascript.builtins.Object.setPrototypeOfSyntax
-+Object.setPrototypeOf(obj, prototype);
Object.setPrototypeOf(obj, prototype);
Parameters
@@ -37,14 +37,14 @@ browser-compat: javascript.builtins.Object.setPrototypeOfExamples
-var dict = Object.setPrototypeOf({}, null); +var dict = Object.setPrototypeOf({}, null);Polyfill
예전 버전의 프로퍼티 {{jsxref("Object.prototype.__proto__")}} 를 사용한다면, 우리는 쉽게 Object.setPrototypeOf 가 쉽게 정의 할수 있다.
-// Only works in Chrome and FireFox, does not work in IE: +// Only works in Chrome and FireFox, does not work in IE: Object.setPrototypeOf = Object.setPrototypeOf || function(obj, proto) { obj.__proto__ = proto; return obj; @@ -55,7 +55,7 @@ Object.setPrototypeOf = Object.setPrototypeOf || function(obj, proto) {-
Object.getPrototypeOf()
and {{jsxref("Object.proto", "Object.prototype.__proto__")}} 의 결합은 새로운 프로토타입 오브젝트에 전반적인 프로토타입 Chain을 설정하도록 할수 있다./** +/** *** Object.appendChain(@object, @prototype) * * Appends the first non-native prototype of a chain to a new prototype. @@ -103,7 +103,7 @@ Object.appendChain = function(oChain, oProto) {First example: 프로토타입에 Chain 설정하기
-function Mammal() { +function Mammal() { this.isMammal = 'yes'; } @@ -129,7 +129,7 @@ console.log(oCat.breathing); // 'yes'Second example: 객체 Constructor의 인스턴스에 존재하는 원래 값을 변경 및 해당 객체 프로토타입에 Chain 설정하기
-function MySymbol() { +function MySymbol() { this.isSymbol = 'yes'; } @@ -146,7 +146,7 @@ console.log(typeof oPrime); // 'object'Third example: Function.prototype객체에 Chain을 설정하고 그 Chain에 새로운 함수를 설정하기
-function Person(sName) { +function Person(sName) { this.identity = sName; } -- cgit v1.2.3-54-g00ecf