Engrain by ByteRush

JS.06 4 concepts · 2 ready

Objects, collections and copying

Choose the right collection and copy data correctly.

  1. JS.06.01Property descriptors, freeze and sealMid-levelBeing written
  2. JS.06.02Map, Set, WeakMap, WeakSet, WeakRefCoreMid-level10 min
  3. JS.06.03Shallow vs deep copyCoreJunior9 min
  4. JS.06.04Immutability patternsMid-levelBeing written

Interview questions in this module

  1. When would you use a Map instead of a plain object?
  2. What is a WeakMap and when is it useful?
  3. What is the difference between a shallow and a deep copy? How do you deep copy?
  4. What does structuredClone not support?
  5. Does Object.freeze make an object deeply immutable?
  6. In what order are object keys iterated?