| ★ wanayoo — archive 1999 http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Object | Nouvelle recherche | Portail wanayoo |
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 instances All objects in JavaScript are descended from </div>Object</code>; all objects inherit methods and properties from Core_JavaScript_1.5_Reference:Global_Objects:Object:prototypeObject.prototype, although they may be overridden. For example, other constructors' prototypes override the <code>constructor property and provide their own toString methods. Changes to the Object prototype object are propagated to all objects unless the properties and methods subject to those changes are overridden further along the prototype chain.
=== Properties ===
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 18:31, 3 Jul 2008 by Sevenspade