PS: I'm Chinese. I will try my best to describe my questions in English as clearly as possible.
My question is at chapter 6 (6.1.1), nearby the example DataPropertiesExample03.htm : you said -- If the configurable
attribute was set to false
, no attribute can be changed besides writable.
However, when I test it, I found it throw an Error.(Please look at the picture below.) I wonder whether it's the error of the book or my misunderstanding.
In addition, I found that, when the property already exists, I used Object.defineProperty()
to modify configurable
to false
. Next, I modified other attributes -- value to "Caaa" and it logs "Caaa", configurable
to true
and it threw an error.
I feel confused that why I modified other attributes such as value, writable and enumerable, it could ran out a result but configurable to true then throw an error, after I set configurable to false.(Please look at the picture below.)
I am looking forward to receiving your reply.
Thanks a lot!
Regards.
--
You received this message because you are subscribed to the Google Groups "Zakas Books" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zakasbooks+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.