What is freeze and seal in JavaScript? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 4

What is freeze and seal in JavaScript?

20th Jul 2019, 2:20 PM
Chetan Mude
Chetan Mude - avatar
1 Answer
+ 16
SealĀ prevents changes to the named interfaces - no adds, deletes - but you can mutate the object and redefine the meaning of its interface. Similarity: both of them are used for creating non extensible objects. Difference : InĀ FreezeĀ configurable , enumerable and writable attributes of the object are set to false . https://stackoverflow.com/questions/21402108/difference-between-freeze-and-seal
20th Jul 2019, 3:07 PM
Zhenis Otarbay
Zhenis Otarbay - avatar