Determining if an Object is Sealed or Frozen in Javascript


Use Object.isSealed or Object.isFrozen to check if an object is sealed or frozen.

Source Code

let obj = { name: 'John' };
Object.freeze(obj);
console.log(Object.isFrozen(obj)); // true
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments