The Object constructor creates an object wrapper for the given value. If the value is null or undefined, it will create and return an empty object, otherwise, it will return an object of type that corresponds to the given value.
When called in a non-constructor context, Object behaves identically.
For properties inherited by Object instances, see Properties of Object instances.
Properties inherited from Function.prototype
caller, constructor, length, name
For methods inherited by Object instances, see Methods of Object instances.
Although the Object object contains no methods of its own, it does inherit some methods through the prototype chain.
Methods inherited from Object.prototype
__defineGetter__, __defineSetter__, hasOwnProperty, isPrototypeOf, __lookupGetter__, __lookupSetter__, __noSuchMethod__, propertyIsEnumerable, unwatch, watch
Object given undefined and null types The following examples return an empty Object object:
var o = new Object(); o = new Object(undefined); o = new Object(null);
Object to create Boolean objects The following examples return Boolean objects:
o = new Object(true); // equivalent to o = new Boolean(true); o = new Object(Boolean()); // equivalent to o = new Boolean(false);
Page last modified 04:09, 15 Jul 2008 by Cuimingda