Write a function mergeObjects(obj1, obj2) that merges these two objects example const obj1 = { a: 1, h: [1, 2, 3], c: { x: 10, y: 20 } }; const obj2 = { b: 2, h: [4, 5], c: { y: 30, z: 40 } }; Output { a: 1, b: 2, h: [1,2,3,4,5], c: { x: 10, y: 30, z: 40 } }
Check out your Company Bowl for anonymous work chats.