Object.isFrozen()

The Object.isFrozen() determines if an object is frozen.

const object1 = {
  property1: 42
};

console.log(Object.isFrozen(object1));
// expected output: false

Object.freeze(object1);

console.log(Object.isFrozen(object1));
// expected output: true

Last updated