Deep Clone Object
JAVASCRIPT
Hard
+40 XP
Problem Description
Write a function `deepClone(obj)` that returns a deep copy of an object (nested objects should also be cloned, not referenced).
Example:
const a = { x: 1, y: { z: 2 } };
const b = deepClone(a);
b.y.z = 99;
// a.y.z should still be 2
Example:
const a = { x: 1, y: { z: 2 } };
const b = deepClone(a);
b.y.z = 99;
// a.y.z should still be 2
Your Solution