
Object
JavaScript Pocket Reference
|
109
See Also
Math
Object
the superclass of all JavaScript objects
Core JavaScript 1.0; JScript 1.0; ECMA v1
Constructor
new Object();
This constructor creates an empty object to which you can add
arbitrary properties.
Properties
All JavaScript objects, how ever they are created, have the
following properties.
constructor
A reference to the JavaScript function that was the
constructor for the object. JS 1.1; JScript 2.0; ECMA v1.
Methods
All JavaScript objects, how ever they are created, have the
following methods.
hasOwnProperty(propname)
Returns true if the object has a non-inherited property with
the specified name. Returns
false if the object does not have
a property with the specified name, or if it inherits that prop-
erty from its prototype object. JS 1.5; JScript 5.5; ECMA v3.
isPrototypeOf(o)
Returns true if this object is the prototype of o. Returns false
if o is not an object or if this object is not its prototype. JS 1.5;
JScript 5.5; ECMA v3.
propertyIsEnumerable(propname)
Returns true if this object has a non-inherited enumerable
property with the specified name, and returns
false other-
wise. Enumerable properties are those that are enumerated by
for/in loops. JS 1.5; JScript 5.5; ECMA v3.