Gets the own property descriptor of the specified object. An own property descriptor is one that is defined directly on the object and is not inherited from the object’s prototype.
getOwnPropertyDescriptor(object, propertyName)
object
The object that contains the property.
propertyName
The name of the property.
A property descriptor of the specified property, or undefined if the property does not exist.
let obj = { temperature: 37 }
Object.getOwnPropertyDescriptor(obj, "temperature")
{value: 37, writable: true, enumerable: true, configurable: true}