+ 4

What is freeze and seal in JavaScript?

20th Jul 2019, 2:20 PM
Chetan Mude
Chetan Mude - avatar
2 Respuestas
+ 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