liveBook · Manning

Property descriptor

A property descriptor is an object specifying a JavaScript property's data or accessor attributes and behavior.

How 3 Manning books explain it

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.

Read how JavaScript in Depth explains property descriptor →

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

Related concepts

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.