JS Built-ins
ObjectObject.isFrozenintermediate

Object.isFrozen() β€” after seal (not frozen)

πŸ“– Usage Example
// Check if an object is frozen
const obj = { a: 1 }
Object.isFrozen(obj)    // β†’ false
Object.freeze(obj)
Object.isFrozen(obj)    // β†’ true

Use Object.isFrozen() to verify that an object is fully immutable (no additions, deletions, or value changes allowed).

Object.isFrozen() β€” sealed is NOT frozen

Object.seal() prevents adding/removing properties but allows modifying existing writable ones. So a sealed object with writable properties is not frozen.

Challenge: Show the difference between sealed and frozen objects using Object.isFrozen().

πŸ’‘ Hints (1)
  • β€’ seal is weaker than freeze β€” sealed objects can still be written to