From 95d95574d926e04d95b5a1008f7c895ca68f5d9d Mon Sep 17 00:00:00 2001 From: 윤승재 Date: Thu, 29 Jul 2021 08:54:49 +0900 Subject: [ko] add /ko/docs/Web/JavaScript/Reference/Global_Objects/Object/Object (#1454) * add object/index.html * Update files/ko/web/javascript/reference/global_objects/object/object/index.html Co-authored-by: SoHyun Park Co-authored-by: echo.youn Co-authored-by: SoHyun Park --- .../global_objects/object/object/index.html | 71 ++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 files/ko/web/javascript/reference/global_objects/object/object/index.html (limited to 'files/ko/web') diff --git a/files/ko/web/javascript/reference/global_objects/object/object/index.html b/files/ko/web/javascript/reference/global_objects/object/object/index.html new file mode 100644 index 0000000000..26c78b9000 --- /dev/null +++ b/files/ko/web/javascript/reference/global_objects/object/object/index.html @@ -0,0 +1,71 @@ +--- +title: Object() constructor +slug: Web/JavaScript/Reference/Global_Objects/Object/Object +tags: +- Constructor +- JavaScript +- Object +- Reference +browser-compat: javascript.builtins.Object.Object +--- +
{{JSRef}}
+ +

Object의 생성자는 주어진 값를 객체 래퍼로 만들어 줍니다.

+ +
    +
  • 만약 값이 {{jsxref("null")}} 또는 {{jsxref("undefined")}} 라면, 빈 객체를 생성하여 반환합니다.
  • +
  • 그렇지 않으면, 주어진 값의 타입 객체를 반환합니다.
  • +
  • 만약 주어진 값이 객체라면, 해당 값을 그대로 반환합니다.
  • +
+ +

비 생성자 컨텍스트로 호출되면, Objectnew Object() 와 동일하게 동작합니다.

+ +

구문

+ +
new Object()
+new Object(value)
+ +

매개변수

+ +
+
value
+
아무 값
+
+ +

예시

+ +

새로운 객체 생성

+ +
let o = new Object()
+o.foo = 42
+
+console.log(o)
+// Object { foo: 42 }
+ +

undefined와 null을 받는 객체 + types

+ +

다음 예제는 빈 객체o 변수에 저장합니다 :

+ +
let o = new Object()
+
+ +
let o = new Object(undefined)
+
+ +
let o = new Object(null)
+ +

명세

+ +{{Specifications}} + +

브라우저 호환성

+ + +

{{Compat}}

+ +

같이보기

+ + -- cgit v1.2.3-54-g00ecf