|25.2.1.The Object Class|
All the properties and methods of the Object class are also present in the other classes.
The Object class has the following properties:
- constructor -- For the Object class, this points to the native Object() function.
- prototype -- For the all classes, this returns an instance of Object by default.
The Object class also has several methods:
Determines if a given property exists for the object.
The property must be specified as a string.
For example, o.hasOwnProperty("name").
Determines if the object is a prototype of another object.
Determines if a given property can be enumerated by using the for...in statement.
Returns a primitive string representation of the object.
Returns the most appropriate primitive value of this object.
For many classes, this returns the same value as toString().
Each of the properties and methods listed previously are designed to be overridden by other classes.