This commit is contained in:
Ilya Kantor 2019-09-02 23:31:05 +03:00
parent 15f8b887f1
commit c01347aa2e
5 changed files with 4 additions and 6 deletions

View file

@ -248,14 +248,12 @@ Object.defineProperty(user, "name", {writable: true}); // Error
*/!*
```
```smart header="Non-configurable doesn't mean \"non-writable\""
```smart header="\"Non-configurable\" doesn't mean \"non-writable\""
Notable exception: a value of non-configurable, but writable property can be changed.
The idea of `configurable: false` is to prevent changes to property flags and its deletion, not changes to its value.
```
## Object.defineProperties
There's a method [Object.defineProperties(obj, descriptors)](mdn:js/Object/defineProperties) that allows to define many properties at once.