Name
Object
Constructor
new Object( );
This constructor creates an empty object to which you can add arbitrary properties.
Properties
All JavaScript objects, however 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, however they are created, have the following methods.
-
hasOwnProperty(propname) Returns
trueif the object has a non-inherited property with the specified name. Returnsfalseif the object does not have a property with the specified name, or if it inherits that property from its prototype object. JS 1.5; JScript 5.5; ECMA v3.-
isPrototypeOf(o) Returns
trueif this object is the prototype ofo. Returnsfalseifois not an object or if this object is not its prototype. JS 1.5; JScript 5.5; ECMA v3.-
propertyIsEnumerable(propname) Returns
trueif this object has a non-inherited enumerable property with the specified name, and returnsfalseotherwise. Enumerable properties are those that are enumerated byfor/inloops. JS 1.5; JScript 5.5; ECMA v3.-
toLocaleString( ) Returns a localized string representation of the object. The default implementation of this method simply calls
toString( ), but subclasses may override it to provide localization. JS 1.5; JScript 5.5; ECMA v3.-
toString( ) Returns a string representation of the object. The implementation of this method provided by the Object class is quite generic and ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access