deepClone (with cycles, Map, Set, Date, RegExp)
Comes up in: Coding
This concept is being written. It gets the full five steps — explanation, predict, interview angle, practice with tests, and review cards. Here is exactly what it will cover, so you can study it elsewhere in the meantime.
What it covers
- recursion
- WeakMap for cycles
- special types
- preserving prototype (option)
- symbols as keys
- comparison with structuredClone
Words you will know
What you will practise
- implement with tests
Interview questions this answers
- Implement
deepClonethat handles circular references.