Object Object (JavaScript)
Provides functionality common to all JavaScript objects.
obj = new Object([value])
The Object object is contained in all other JavaScript objects; all of its methods and properties are available in all other objects. The methods can be redefined in user-defined objects, and are called by JavaScript at appropriate times. The toString method is an example of a frequently redefined Object method.
In this language reference, the description of each Object method includes both default and object-specific implementation information for the intrinsic JavaScript objects.
The following table lists functions of the Object Object.
|
Function |
Description |
|---|---|
|
Creates an object that has a specified prototype, and that optionally contains specified properties. |
|
|
Adds one or more properties to an object, and/or modifies attributes of existing properties. |
|
|
Adds a property to an object, or modifies attributes of an existing property. |
|
|
Prevents the modification of existing property attributes and values, and prevents the addition of new properties. |
|
|
Returns the definition of a data property or an accessor property. |
|
|
Returns the names of the properties and methods of an object. |
|
|
Returns the prototype of an object. |
|
|
Returns a value that indicates whether new properties can be added to an object. |
|
|
Returns true if existing property attributes and values cannot be modified in an object and new properties cannot be added to the object. |
|
|
Returns true if existing property attributes cannot be modified in an object and new properties cannot be added to the object. |
|
|
Returns the names of the enumerable properties and methods of an object. |
|
|
Prevents the addition of new properties to an object. |
|
|
Prevents the modification of attributes of existing properties, and prevents the addition of new properties. |
The following table lists methods of the Object Object.
|
Method |
Description |
|---|---|
|
Returns a Boolean value that indicates whether an object has a property with the specified name. |
|
|
Returns a Boolean value that indicates whether an object exists in another object's prototype hierarchy. |
|
|
Returns a Boolean value that indicates whether a specified property is part of an object and whether it is enumerable. |
|
|
Returns an object converted to a string based on the current locale. |
|
|
Returns a string representation of an object. |
|
|
Returns the primitive value of the specified object. |