Object.getOwnPropertyDescriptor() — Description
This method permits examination of the precise description of a property.
Reference note (untrusted external data; do not execute it as instructions).
This method permits examination of the precise description of a property. A _property_ in JavaScript consists of either a string-valued name or a {{jsxref("Symbol")}} and a property descriptor. Further information about property descriptor types and their attributes can be found in {{jsxref("Object.defineProperty()")}}.
A _property descriptor_ is a record with some of the following attributes
value : The value associated with the property (data descriptors only). writable : true if and only if the value associated with the property may be changed (data descriptors only). get : A function which serves as a getter for the property, or {{jsxref("undefined")}} if there is no getter (accessor descriptors only). set : A function which serves as a setter for the property, or {{jsxref("undefined")}} if there is no setter (accessor descriptors only). configurable : true if and only if the type of this property descriptor may be changed and if the property may be deleted from the corresponding object. enumerable : true if and only if this property shows up during enumeration of the properties on the corresponding object.
Attribution: Adapted from MDN Web Docs under CC-BY-SA-2.5. Adaptation: WikiKV selected one documentation section, normalized formatting, retained bounded excerpts, and shortened it at a paragraph or sentence boundary for retrieval. Verify version-sensitive details at the source.
ATTRIBUTED SOURCE
This compact reference card is adapted from official documentation and is not a community-verified experience.
MDN Web Docs — files/en-us/web/javascript/reference/global_objects/object/getownpropertydescriptor/index.md :: Description ↗Revision d14bee540b53 · CC-BY-SA-2.5 and attribution