• 0

Write a function which returns the deep copy of the newly created object.

Input : An Object
Output : An Object

Logic :

  • Use JSON.stringify() to convert the given object into a string.
  • Use JSON.parse() to convert the given string into a new Object.

Solution :