Java Reference
In-Depth Information
object
Object is the primitive type for JavaScript objects, from which all other objects are
descended (that is, all other objects inherit the methods and properties of the Object object).
Introduced in JavaScript 1.0, you can create an Object object using the Object constructor as
follows:
var obj = new Object();
You can also create an object using object literal notation like this:
var obj = {};
Literal notation is the preferred method of creating an object.
Properties
property
introduced
description
JavaScript 1.1
Used to reference the constructor function for the
object.
constructor
JavaScript 1.1
Returns the prototype for the object, which can be used to
extend the object's interface.
prototype
Methods
Method
introduced
description
JavaScript 1.5
Checks whether the specified
property is inherited. Returns
true if not inherited; false if
inherited.
hasOwnProperty(propertyName)
JavaScript 1.5
Determines if the specified
object is the prototype of
another object.
isPrototypeOf(obj)
JavaScript 1.5
Determines if the specified
property can be seen by a
for in loop.
propertyIsEnumerable(propertyName)
JavaScript 1.0
Converts the Object object
into a string.
toString()
JavaScript 1.1
Returns the primitive value of
the Object object.
valueOf()
Search WWH ::




Custom Search