From 15f8b887f1e7b5718194790eef08a4b52f8eb95f Mon Sep 17 00:00:00 2001 From: Ilya Kantor Date: Mon, 2 Sep 2019 23:21:04 +0300 Subject: [PATCH] closes #1309 --- .../01-property-descriptors/article.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/1-js/07-object-properties/01-property-descriptors/article.md b/1-js/07-object-properties/01-property-descriptors/article.md index 59cffa72..43bede82 100644 --- a/1-js/07-object-properties/01-property-descriptors/article.md +++ b/1-js/07-object-properties/01-property-descriptors/article.md @@ -227,8 +227,6 @@ To be precise, non-configurability imposes several restrictions on `defineProper 3. Can't change `writable: false` to `true` (the other way round works). 4. Can't change `get/set` for an accessor property (but can assign them if absent). -Notable exception: a value of non-configurable, but writable property still can be changed. - Here we are making `user.name` a "forever sealed" constant: ```js run @@ -250,6 +248,14 @@ Object.defineProperty(user, "name", {writable: true}); // Error */!* ``` +```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.