?um/The Object
extends clause of a class definition.When the Object function is called with optional argument value, the following steps are taken:
The Object function is
The Object
The 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 function is called, the following steps are taken:
The assign function is
The create function creates a new object with a specified prototype. When the create function is called, the following steps are taken:
The defineProperties function is used to add own properties and/or update the attributes of existing own properties of an object. When the defineProperties function is called, the following steps are taken:
The abstract operation ObjectDefineProperties takes arguments O (an Object) and Properties and returns either a
The defineProperty function is used to add an own property and/or update the attributes of an existing own property of an object. When the defineProperty function is called, the following steps are taken:
When the entries function is called with argument O, the following steps are taken:
When the freeze function is called, the following steps are taken:
When the fromEntries method is called with argument iterable, the following steps are taken:
When the getOwnPropertyDescriptor function is called, the following steps are taken:
When the getOwnPropertyDescriptors function is called, the following steps are taken:
When the getOwnPropertyNames function is called, the following steps are taken:
When the getOwnPropertySymbols function is called with argument O, the following steps are taken:
The abstract operation GetOwnPropertyKeys takes arguments O and type (
When the getPrototypeOf function is called with argument O, the following steps are taken:
When the hasOwn method is called, the following steps are taken:
When the is function is called with arguments value1 and value2, the following steps are taken:
When the isExtensible function is called with argument O, the following steps are taken:
When the isFrozen function is called with argument O, the following steps are taken:
When the isSealed function is called with argument O, the following steps are taken:
When the keys function is called with argument O, the following steps are taken:
When the preventExtensions function is called, the following steps are taken:
The initial value of Object.prototype is the
This property has the attributes { [[Writable]]:
When the seal function is called, the following steps are taken:
When the setPrototypeOf function is called with arguments O and proto, the following steps are taken:
When the values function is called with argument O, the following steps are taken:
The Object prototype object:
The initial value of Object.prototype.constructor is
When the hasOwnProperty method is called with argument V, the following steps are taken:
When the isPrototypeOf method is called with argument V, the following steps are taken:
When the propertyIsEnumerable method is called with argument V, the following steps are taken:
This method does not consider objects in the prototype chain.
When the toLocaleString method is called, the following steps are taken:
The optional parameters to this function are not used but are intended to correspond to the parameter pattern used by ECMA-402 toLocaleString functions. Implementations that do not include ECMA-402 support must not use those parameter positions for other purposes.
This function provides a generic toLocaleString implementation for objects that have no locale-sensitive toString behaviour. Array, Number, Date, and toLocaleString methods.
ECMA-402 intentionally does not provide an alternative to this default implementation.
When the toString method is called, the following steps are taken:
Historically, this function was occasionally used to access the String value of the [[Class]] internal slot that was used in previous editions of this specification as a nominal type tag for various built-in objects. The above definition of toString preserves compatibility for legacy code that uses toString as a test for those specific kinds of built-in objects. It does not provide a reliable type testing mechanism for other kinds of built-in or program defined objects. In addition, programs can use
When the valueOf method is called, the following steps are taken:
Object.prototype.__proto__ is an
The value of the [[Get]] attribute is a built-in function that requires no arguments. It performs the following steps when called:
The value of the [[Set]] attribute is a built-in function that takes an argument proto. It performs the following steps when called:
When the __defineGetter__ method is called with arguments P and getter, the following steps are taken:
When the __defineSetter__ method is called with arguments P and setter, the following steps are taken:
When the __lookupGetter__ method is called with argument P, the following steps are taken:
When the __lookupSetter__ method is called with argument P, the following steps are taken:
Object instances have no special properties beyond those inherited from the
The Function
Function(…) is equivalent to the object creation expression new Function(…) with the same arguments.extends clause of a class definition. Subclass super call to the Function The last argument specifies the body (executable code) of a function; any preceding arguments specify formal parameters.
When the Function function is called with some arguments p1, p2, … , pn, body (where n might be 0, that is, there are no “ p ” arguments, and where body might also not be provided), the following steps are taken:
It is permissible but not necessary to have one argument for each formal parameter to be specified. For example, all three of the following expressions produce the same result:
new Function("a", "b", "c", "return a+b+c")
new Function("a, b, c", "return a+b+c")
new Function("a,b", "c", "return a+b+c")
The abstract operation CreateDynamicFunction takes arguments constructor (a new was initially applied to. args is the argument values that were passed to constructor. It performs the following steps when called:
new Function("/*", "*/ ) {") is not legal.CreateDynamicFunction defines a
The Function
This is a
The value of Function.prototype is the
This property has the attributes { [[Writable]]:
The Function prototype object:
new operator.The Function prototype object is specified to be a
When the apply method is called with arguments thisArg and argArray, the following steps are taken:
The thisArg value is passed without modification as the
If func is an arrow function or a
When the bind method is called with argument thisArg and zero or more args, it performs the following steps:
Function.prototype.bind are
If Target is an arrow function or a
When the call method is called with argument thisArg and zero or more args, the following steps are taken:
The thisArg value is passed without modification as the
If func is an arrow function or a
The initial value of Function.prototype.constructor is
When the toString method is called, the following steps are taken:
When the @@hasInstance method of an object F is called with value V, the following steps are taken:
This property has the attributes { [[Writable]]:
This is the default implementation of @@hasInstance that most functions inherit. @@hasInstance is called by the instanceof operator to determine whether a value is an instance of a specific
v instanceof F
evaluates as
F[@@hasInstance](v)
A instanceof by exposing a different @@hasInstance method on the function.
This property is non-writable and non-configurable to prevent tampering that could be used to globally expose the target function of a bound function.
The value of the
Every Function instance is an ECMAScript Function.prototype.bind method (
Function instances have the following properties:
The value of the
The value of the
Anonymous functions objects that do not have a contextual name associated with them by this specification use the empty String as the value of the
Function instances that can be used as a
This property has the attributes { [[Writable]]:
Function.prototype.bind, or by evaluating a
The
An implementation of HostHasSourceTextAvailable must conform to the following requirements:
The default implementation of HostHasSourceTextAvailable is to return
The Boolean
extends clause of a class definition. Subclass super call to the Boolean When Boolean is called with argument value, the following steps are taken:
The Boolean
The initial value of Boolean.prototype is the
This property has the attributes { [[Writable]]:
The Boolean prototype object:
The abstract operation thisBooleanValue takes argument value. It performs the following steps when called:
The initial value of Boolean.prototype.constructor is
The following steps are taken:
The following steps are taken:
Boolean instances are
The Symbol
new operator.extends clause of a class definition but a super call to it will cause an exception.When Symbol is called with optional argument description, the following steps are taken:
The Symbol
The initial value of Symbol.asyncIterator is the well known symbol
This property has the attributes { [[Writable]]:
When Symbol.for is called with argument key it performs the following steps:
The GlobalSymbolRegistry is a
The initial value of Symbol.hasInstance is the well-known symbol
This property has the attributes { [[Writable]]:
The initial value of Symbol.isConcatSpreadable is the well-known symbol
This property has the attributes { [[Writable]]:
The initial value of Symbol.iterator is the well-known symbol
This property has the attributes { [[Writable]]:
When Symbol.keyFor is called with argument sym it performs the following steps:
The initial value of Symbol.match is the well-known symbol
This property has the attributes { [[Writable]]:
The initial value of Symbol.matchAll is the well-known symbol
This property has the attributes { [[Writable]]:
The initial value of Symbol.prototype is the
This property has the attributes { [[Writable]]:
The initial value of Symbol.replace is the well-known symbol
This property has the attributes { [[Writable]]:
The initial value of Symbol.search is the well-known symbol
This property has the attributes { [[Writable]]:
The initial value of Symbol.species is the well-known symbol
This property has the attributes { [[Writable]]:
The initial value of Symbol.split is the well-known symbol
This property has the attributes { [[Writable]]:
The initial value of Symbol.toPrimitive is the well-known symbol
This property has the attributes { [[Writable]]:
The initial value of Symbol.toStringTag is the well-known symbol
This property has the attributes { [[Writable]]:
The initial value of Symbol.unscopables is the well-known symbol
This property has the attributes { [[Writable]]:
The Symbol prototype object:
The abstract operation thisSymbolValue takes argument value. It performs the following steps when called:
The initial value of Symbol.prototype.constructor is
Symbol.prototype.description is an
The following steps are taken:
The abstract operation SymbolDescriptiveString takes argument sym (a Symbol) and returns a String. It performs the following steps when called:
The following steps are taken:
This function is called by ECMAScript language operators to convert a Symbol object to a primitive value.
When the @@toPrimitive method is called with argument hint, the following steps are taken:
The argument is ignored.
This property has the attributes { [[Writable]]:
The value of the
The initial value of the
This property has the attributes { [[Writable]]:
Symbol instances are
Instances of Error objects are thrown as exceptions when runtime errors occur. The Error objects may also serve as base objects for user-defined exception classes.
When an ECMAScript implementation detects a runtime error, it throws a new instance of one of the NativeError objects defined in name property of the prototype object, in the message property of the prototype object, and in the presence of the errors property.
The Error
Error(…) is equivalent to the object creation expression new Error(…) with the same arguments.extends clause of a class definition. Subclass super call to the Error When the Error function is called with argument message and optional argument options, the following steps are taken:
The Error
The initial value of Error.prototype is the
This property has the attributes { [[Writable]]:
The Error prototype object:
The initial value of Error.prototype.constructor is
The initial value of Error.prototype.message is the empty String.
The initial value of Error.prototype.name is
The following steps are taken:
Error instances are Object.prototype.toString.
A new instance of one of the NativeError objects below or of the AggregateError object is thrown when a runtime error is detected. All NativeError objects share the same structure, as described in
The EvalError
This exception is not currently used within this specification. This object remains for compatibility with previous editions of this specification.
The RangeError
Indicates a value that is not in the set or range of allowable values.
The ReferenceError
Indicate that an invalid reference has been detected.
The SyntaxError
Indicates that a parsing error has occurred.
The TypeError
TypeError is used to indicate an unsuccessful operation when none of the other NativeError objects are an appropriate indication of the failure cause.
The URIError
Indicates that one of the global URI handling functions was used in a way that is incompatible with its definition.
When an ECMAScript implementation detects a runtime error, it throws a new instance of one of the NativeError objects defined in
For each error object, references to NativeError in the definition should be replaced with the appropriate error object name from
Each NativeError
NativeError(…) is equivalent to the object creation expression new NativeError(…) with the same arguments.extends clause of a class definition. Subclass super call to the NativeError When a NativeError function is called with argument message and optional argument options, the following steps are taken:
"%NativeError.prototype%", « [[ErrorData]] »).The actual value of the string passed in step
Each NativeError
The initial value of NativeError.prototype is a NativeError prototype object (
This property has the attributes { [[Writable]]:
Each NativeError prototype object:
The initial value of the
The initial value of the
The initial value of the
NativeError instances are Object.prototype.toString (
The AggregateError
AggregateError(…) is equivalent to the object creation expression new AggregateError(…) with the same arguments.extends clause of a class definition. Subclass super call to the AggregateError When the
The AggregateError
The initial value of AggregateError.prototype is
This property has the attributes { [[Writable]]:
The AggregateError prototype object:
The initial value of AggregateError.prototype.constructor is
The initial value of AggregateError.prototype.message is the empty String.
The initial value of AggregateError.prototype.name is
AggregateError instances are Object.prototype.toString (
The abstract operation InstallErrorCause takes arguments O (an Object) and options (an