JS ⟩ value ⟩ object ⟩ property ⟩ attribute ⟩ property descriptor
an object that represents the attributes of another object.
// data property descriptor { value: 1 writable: true, enumerable: true, configurable: true, } // accessor property descriptor { get: function(){}, // ES6: get(){} set: function(){}, // ES6: set(){} enumerable: true, configurable: true, }
JavaScript: The Definitive Guide ⟩ 14.1 Property Attributes
Object.defineProperty() - define/update property using property descriptors.
Object.getOwnPropertyDescriptor(obj, prop)
Reflect.getOwnPropertyDescriptor()
Last updated 2 years ago