freeze

2019-07-09  本文已影响0人  peerben

复习一下

The Object.freeze function does the following:

Makes the object non-extensible, so that new properties cannot be added to it.
Sets the configurable attribute to false for all properties of the object. When - configurable is false, the property attributes cannot be changed and the property cannot be deleted.
Sets the writable attribute to false for all data properties of the object. When writable is false, the data property value cannot be changed.

上一篇下一篇

猜你喜欢

热点阅读