-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers
Description
We should have a method that duplicates an object, like this:
helpful.duplicateObject({"a": 1, "b": 2}) => {"a": 1, "b": 2}
You must use a for loop for this method to copy over all the keys and their corresponding values to the new object.
We should also have a method that duplicates an object and all inner objects, like this:
helpful.deepDuplicateObject({"a": 1, "b": 2, "c": {"d": 4, "e": 5}}) =>{"a": 1, "b": 2, "c": {"d": 4, "e": 5}}
We encourage using the duplicateObject
method and recursion to create the deepDuplicateObject
method.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers