Property descriptor
A property descriptor is an object specifying a JavaScript property's data or accessor attributes and behavior.
JavaScript in Depth
An object that describes a property’s attributes such as writability, enumerability, configurability, or getter/setter behavior.
- How it is used
- Diagnoses and controls property reads, writes, enumeration, deletion, and redefinition through descriptor attributes.
- How deep it goes
- Explains internal attributes, defaults, APIs, accessor distinctions, and strict-mode effects, but stops short of runtime storage internals.
- Examples
- Uses drawer objects, locked serial numbers, hidden internal identifiers, and getter/setter-backed contents.
- What you can do after
- Diagnose/debug surprising assignments, iteration omissions, deletions, and redefinitions with descriptor inspection and configuration.
Secrets of the JavaScript Ninja, Second Edition
An object that specifies the attributes and accessors used to define or control a JavaScript property.
- How it is used
- Configures property behavior and repairs the constructor link after changing a prototype.
- How deep it goes
- Defines descriptor attributes, accessor constraints, and a worked constructor repair, without detailing runtime internals.
- Examples
- Uses a non-enumerable sneaky property and restores Ninja.prototype.constructor after prototype reassignment.
- What you can do after
- Configure JavaScript properties with Object.defineProperty, including non-enumerable properties and a corrected constructor link.
Read how Secrets of the JavaScript Ninja, Second Edition explains property descriptor →
Secrets of the JavaScript Ninja, Third Edition
A property descriptor is an object that specifies the attributes used to define a JavaScript property.
- How it is used
- Defines or redefines object properties by specifying their attributes.
- How deep it goes
- Explains enumerability and accessor descriptors with examples, without detailing every descriptor attribute.
- Examples
- Uses a getter and setter for firstNinja and a getter-only randomNumber property that rejects writes.
- What you can do after
- Apply Object.defineProperty to control property enumeration and define getter or setter behavior.
Read how Secrets of the JavaScript Ninja, Third Edition explains property descriptor →
What to know first
- attributeAn attribute is a named property or piece of information associated with an entity, object, or structured data item.
Related concepts
- accessor descriptorincludes · An accessor descriptor defines an object property whose value is read or changed through getter and setter functions rather than directly stored.
- Object.definePropertyused by · Object.defineProperty is a JavaScript built-in method that creates or modifies an object property using an explicitly specified property descriptor.
- attributeconfigures · An attribute is a named property or piece of information associated with an entity, object, or structured data item.
- Object.getOwnPropertyDescriptorused by · A standard JavaScript method that returns the property descriptor for a specified own property.
- [[Value]]has part · An internal slot in a JavaScript property descriptor that holds the stored value of a data property.
- data descriptorincludes · A data descriptor is a property descriptor that specifies a property's stored value and data-property attributes.
Questions about property descriptor
What is property descriptor?
A property descriptor is an object specifying a JavaScript property's data or accessor attributes and behavior.
Which Manning books explain property descriptor?
JavaScript in Depth, Secrets of the JavaScript Ninja, Second Edition and Secrets of the JavaScript Ninja, Third Edition.
What should I know before learning property descriptor?
Manning books that teach property descriptor usually introduce for...in and attribute first.
What kinds of property descriptor are there?
Kinds of property descriptor include accessor descriptor and data descriptor.
What are the parts of property descriptor?
Property descriptor includes [[Value]].
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.


