JavaScript From The Start


JavaScript Object Property Descriptors


Hide/Show description

When you create an Object and add properties there are actually six property descriptors that you can use to define qualities of the property that you have added. DATA property descriptors are value writable configurable enumerable ACCESSOR property descriptors are configurable enumerable get set You can use these property descriptors in combination with a collection of Object methods to fine tune access to your properties and their value. See the comments in the Code Gist for a list of all the property descriptors and the Object methods. Code GIST: https://gist.github.com/prof3ssorSt3v3/b38039f992f9ab37f1e4c11350dbf65d