JavaScript: Property Attributes: enumerable, configurable, writable, value

By Xah Lee. Date: . Last updated: .

Property Attributes

Each property has associated info called attribute.

The attributes specify the property value, whether it can be changed, or whether it can be enumerated of function that go thru them.

Data Property Attributes

value
The property's value.
writable
When true, the property's value can be changed.
enumerable
When true, the property shows in some enumeration constructs, such as for-in Loop. [see Access Property]
configurable
If false, you can't delete the property, nor change the property attributes (example: make it configurable again), nor change it to/from get/set property. But you may still change the value.

Accessor Property's Attributes

Getter/Setter Properties

Show Property Attributes

Set Property Attributes

JavaScript Property

BUY
Ξ£JS
JavaScript in Depth

JavaScript in Depth

Basic Syntax

Value Types

Variable

String

Property

Object and Inheritance

Array

Function

Constructor/Class

Iterable 🌟

Misc