HTML and CSS Reference
Figure 8.17 Adding a new method with a prototype.
As we have seen, all user-defined objects and built-in objects are descendants of the
object called Object . The Object object has its own properties and methods that can be
accessed by any objects derived from it.
All objects have the properties and methods shown in Tables 8.1 and 8.2.
Table 8.1 Object Properties
What It Provides
A reference to the function that created the object.
A reference to the object prototype for the object. This allows
the object to share properties and methods.
Table 8.2 Some Object Methods
What It Does
Returns a string representing a specified object.
Returns a primitive value for a specified object.