liveBook · Manning

Enumerable property

An enumerable property is a JavaScript object property whose enumerable descriptor attribute determines whether it is included in property enumeration.

How 3 Manning books explain it

JavaScript in Depth

An internal attribute of a property descriptor that determines whether the property appears during enumeration.

How it is used
Explains why existing properties appear in direct access but disappear from for...in and Object.keys() results.
How deep it goes
Defines the descriptor attribute, demonstrates inspection and hiding, and distinguishes enumeration from value mutation and deletion.
Examples
Uses a hidden internalId property and contrasts Object.keys() output with direct property access.
What you can do after
Diagnose missing properties with Object.getOwnPropertyDescriptor() and control enumeration with Object.defineProperty().

Read how JavaScript in Depth explains enumerable property →

Elixir in Action, Third Edition

An enumerable is a data structure or abstraction that implements the contract required for traversal by Enum operations.

How it is used
Supports Enum operations by providing a traversable data structure and hiding recursive iteration.
How deep it goes
Defines the contract and examples but defers the full contract details to later treatment.
Examples
Uses Enum.each/2, Enum.map/2, Enum.filter/2, and Enum.reduce/3 with lists and other enumerable structures.
What you can do after
Apply it via Enum.each/2, Enum.map/2, Enum.filter/2, and Enum.reduce/3 without writing traversal recursion.

Read how Elixir in Action, Third Edition explains enumerable property →

Secrets of the JavaScript Ninja, Third Edition

An enumerable property is an object property whose enumerable attribute allows it to be included by specified property-iteration and copying operations.

How it is used
Controls whether a property appears in common object iteration, serialization, and copying operations.
How deep it goes
Defines the descriptor flag and lists affected operations without detailing their algorithms.
Examples
Contrasts Object.keys results for two ninjaCollection objects and demonstrates setting enumerable: true.
What you can do after
Apply it via Object.defineProperty to control which properties appear in enumeration and copying.

Read how Secrets of the JavaScript Ninja, Third Edition explains enumerable property →

Related concepts

Questions about enumerable property

What is enumerable property?

An enumerable property is a JavaScript object property whose enumerable descriptor attribute determines whether it is included in property enumeration.

Which Manning books explain enumerable property?

JavaScript in Depth, Elixir in Action, Third Edition and Secrets of the JavaScript Ninja, Third Edition.

What should I know before learning enumerable property?

Manning books that teach enumerable property usually introduce for...in first.

What kinds of enumerable property are there?

Kinds of enumerable property include MapSet and stream.

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.