JavaScript Object.getOwnPropertyDescriptor() MethodThe Object.getOwnPropertyDescriptor method allows to query the full information about a property and returns a property descriptor for an own property (that is, one directly present on an object and not in the object's prototype chain) of a given object. Syntax:Parameterobj: It is the object in which to look for the property. Prop: It is the name of the property whose description is to be retrieved. Return value:It returns a property descriptor of the given property if it exists on the object. Browser Support:
Example 1Output: true true 42 34 Example 2Output: true true 42 Example 3Output: true 56 Next TopicJavaScript Objects |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India