JavaScript Reflect.getOwnPropertyDescriptor() MethodThe static Reflect.getOwnPropertyDescriptor() method is used to retrieve the descriptor of an object's property. It is same as the Object.getOwnPropertyDescriptor method. Syntax:Parameters:Obj: It is the target object in which to look for the property. Key: It is the name of the property to get an own property descriptor for. Return value:It returns the property descriptor object if the property exists in the given target object. Otherwise, it returns undefined. Exceptions:A TypeError, if the target is not an Object. Browser Support:
Example 1Output: undefined true Example 2Output: 234 Undefined true true Example 3Output: 42 undefined true Next TopicJavaScript Reflect |
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