JavaScript tutorial:
Object object

 

Methods 

Properties

The Object object provides functionality common to all JavaScript objects.

Syntax

new Object([value])

The optional value argument is used to convert a primitive data type (number, Boolean, string, or function) into an object. If omitted, an object with no contents is created.

Example

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.

See also: Function Object, Global Object