Glossary Term
Reflect.getOwnPropertyDescriptor()
The Reflect.getOwnPropertyDescriptor() static method is like Object.getOwnPropertyDescriptor(). It returns a property descriptor of the given property if it exists on the object, undefined otherwise.
Reflect.getOwnPropertyDescriptor() provides the reflective semantic of retrieving the property descriptor of an object. The only difference with Object.getOwnPropertyDescriptor() is how non-object targets are handled. Reflect.getOwnPropertyDescriptor() throws a TypeError if the target is not an object, while Object.getOwnPropertyDescriptor() coerces it to an object.
Reflect.getOwnPropertyDescriptor() invokes the [[GetOwnProperty]] object internal method of target.
Return value: A property descriptor object if the property exists as an own property of target; otherwise, undefined.
Syntax example: Reflect.getOwnPropertyDescriptor(target, propertyKey)
Term Connections
Explore related terms connected by shared tags, shared categories, and relationship phrases. This map loads only when it comes into view.
Loading term connections…
