The object type is a complex but very important data type. Objects may be any specific or non-specific group of data and functionality.
Developers may create their own objects by creating instances of the object type and adding properties and methods to it.
Objects are created with the operator new followed by the name of the object type to create.
Following example shows a new object creation:
var o = new Object();
All of the basic properties and methods of the Object type are present on all other more specific and further derived objects; thus each object instance contains following properties and methods:
The function that was used to create the object (in previous example the constructor is the Object() function itself).
Indicates if the given property exists on the object instance (not on the prototype). The property name is given as a string.
Determines if the object is a prototype of another object.
Indicates if the given property can be enumerated using for-in statement. The property name is given as a string.
Returns a string representation of the object that is appropriate for the local (charset) execution.
Returns a string representation of the object;