|
|
|
The Object : is %Object% . is the initial value of the "Object" . . performs a type conversion when called as a function rather than as a is designed to be subclassable. It may be used as the value of an extends extends clause of a class definition. When the Object Object function is called with optional argument value , the following steps are taken: 1. If NewTarget is neither undefined nor the active function, then a. Return ? (NewTarget, "%Object.prototype%" ). 2. If value is undefined or null , return ! 3. Return ! ( value ). The "length" property of the Object Object function is 1 𝔽 . The Object : has a [[Prototype]] internal slot whose value is . has a "length" property. has the following additional properties: The assign assign function is used to copy the values of all of the enumerable own properties from one or more source objects to a target object. When the assign assign function is called, the following steps are taken: 1. Let to be ? ( target ). 2. If only one argument was passed, return to . 3. For each element nextSource of sources , do a. If nextSource is neither undefined nor null , then i. Let from nextSource ). ii. Let keys be ? from .[[OwnPropertyKeys]](). iii. For each element nextKey of keys , do 1. Let desc be ? from .[[GetOwnProperty]]( nextKey ). 2. If desc is not undefined and desc .[[Enumerable]] is true , then a. Let propValue from , nextKey ). b. Perform ? ( to , nextKey , propValue , true ). 4. Return to . 20.1 Object Objects 20.1.1 The Object Constructor 20.1.1.1 Object ( [ value ] ) 20.1.2 Properties of the Object Constructor 20.1.2.1 Object.assign ( target , ... sources ) 480 |