There are two types of properties in ECMAScript: Data properties and accessor properties.
Data properties:The Data property contains the position of a data value, where the value can be read and written. The data attribute has 4 attributes that describe its behavior. 1. [[Configurable]] 2. [[Enumerable]] 3. [[Writable]] 4. [[Value]] to modify the property's default attribute, you must use the Object.defineproperty () method. This method receives three parameters, the object where the property resides, the name of the property, and a descriptor object. Where the properties of the Descriptor object must be: Configurable, enumerable, writable, and value. For example: var person = {};object.defineproperty (person, "name", {writable:false,//note is comma value: "Nicholas"} Note: you can Modify enumerable, writable, and value in multiple calls to the Object.defineproperty () method, but for configurable, if set to false, it can no longer be modified. Additionally, when you call the Object.defineproperty () method, the default value of the writable attribute is False if you do not specify configurable, enumerable. Accessor properties can only be accessed through an object method, with the following four attributes: 1. [[Configurable]] 2. [[Enumerable]] 3. [[Get]] 4. [[Set]] In addition, the accessor property contains getter and setter functions.
About the data properties and accessor properties of an object