Create a function that makes a complete copy of an object including all nested objects and arrays. Changes to the clone should not affect the original.
Examples
Input:{"a":1,"b":{"c":2}}
Output:{"a":1,"b":{"c":2}}
Input:{"a":[1,2,3]}
Output:[1,2,3]
Hints
Check the type of each value - primitives (string, number, boolean, null, undefined) can be returned directly.
For objects and arrays, create a new instance and recursively clone each property/element.
Keep track of already-cloned objects to handle circular references.
Deep Clone
Implement a function that performs a deep copy of a value, avoiding reference sharing.