only copies the values of enumerableproperties, not their attributesโ
if one of the source objects has an accessor property, it is the value returned by the getter that is copied to the target object, not the getter itselfโ
๐ฐ redefine property
configurable properties
โ data property -> accessor property
โ accessor property -> (non-writable) data property
โ configurable -> non-configurable ( one-wayโ)
โ enumerable <-> non-enumerable
โ writable <-> non-writable
โ value <-> another value
non-configurable properties
โ writable -> non-writable ( one-wayโ)
โ
๐ฐ reassign value (to data property)
โ writable - can reassign explicitly. (obj.prop = 1)
non-writable only means that the value can't be reassigned directly.
if configurable, all the attributes could be changed or overwritten completely (data <-> accessor).
By default, all properties of the objects you create are writable, enumerable, and configurable.