Back to search

Object.keys, Object.values, Object.entries, Object.assign, spread with objects, shallow copy vs deep copy, Object.freeze, and Object.seal

Object helpers are useful for inspection and copying, but most built-in copy patterns are still shallow.

JavaScript Medium Theory

Object.keys, Object.values, Object.entries, Object.assign, spread with objects, shallow copy vs deep copy, Object.freeze, and Object.seal

Object helpers are useful for inspection and copying, but most built-in copy patterns are still shallow.

  • `Object.assign` and spread are shallow
  • `freeze` and `seal` change mutability rules
  • Entries are useful for iteration

Object.keys, Object.values, Object.entries, Object.assign, spread with objects, shallow copy vs deep copy, Object.freeze, and Object.seal