A property can exist and remain directly accessible while disappearing from for...in loops and Object.keys(). The [[Enumerable]] descriptor attribute controls that visibility. section 5.2 section 5.2.3
Inspect the attribute with Object.getOwnPropertyDescriptor(). A false enumerable value hides the property from property lists without removing it or preventing direct access. The attribute applies to both data and accessor properties. section 5.2.3
A hidden internal identifier
Object.defineProperty(drawer, 'internalId', { value: 12345, writable: false, enumerable: false }); makes Object.keys(drawer) omit internalId, while drawer.internalId still returns 12345. The property is hidden from enumeration, not deleted.
Keep these descriptor behaviors distinct:
- enumerable controls whether iteration exposes the property. section 5.2.3
- writable controls whether a stored value can change. section 5.2.3
- configurable controls whether the property can be deleted or its descriptor changed. section 5.2.3


