JS Built-ins
ObjectObject.isSealedintermediate

Object.isSealed() β€” empty non-extensible object

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

Use Object.isSealed() to check whether an object's properties cannot be added or removed (though values may still change).

Object.isSealed() β€” empty + preventExtensions = sealed

An empty object that has been made non-extensible (via Object.preventExtensions) is considered sealed, because there are no configurable properties to violate the sealed constraint.

Challenge: Verify this edge case with Object.isSealed().

πŸ’‘ Hints (1)
  • β€’ For empty objects, preventExtensions, seal, and freeze all have the same observable effect