Javascript Object reference.
Javascript build-in Object object reference.
Create objects:
Prototype Methods:
Syntax: | hasOwnProperty(propname) |
Objects can have its own local properties and properties inherited from its prototype object.
This method provides the ability to distinguish between the inherited properties and noninherited local properties. |
|
Return value: | true if the object contains 'propname' as its own local properties. false if the object does not contain 'propname' as a property or 'propname' is an inherited property. |
propname: | A string name of a property, as this method will be using in his test. |
An example of using the hasOwnProperty() :
|
Prototype Properties:
Syntax: | Object.prototype.constructor |
This property of the Object.prototype holds the reference back to the Object object. | |
Important note: | This is the same as the constructor property of an instantiated object |
Constructor (Object) Properties:
Syntax: | Object.constructor |
The constructor property is a reference to the function that will be invoked to create a Object object. |
© 2010 by Finnesand Data.
All rights reserved.
This site aims to provide FREE programming training and technics.
Finnesand Data as site owner gives no warranty for the
correctness in the pages or source codes.
The risk of using this web-site pages or any program
codes from this website is entirely at the individual user.