{"ScriptPreparationCode":null,"TestCases":[{"Name":"Using the spread operator","Code":"const firstObject = {\r\n name: \u0027Alice\u0027,\r\n age: 25,\r\n contact: {\r\n email: \u0027alice@example.com\u0027,\r\n phone: \u0027123-456-7890\u0027,\r\n },\r\n preferences: {\r\n language: \u0027English\u0027,\r\n timezone: \u0027UTC\u0027,\r\n },\r\n};\r\n\r\nconst secondObject = {\r\n job: \u0027Software Engineer\u0027,\r\n skills: [\u0027JavaScript\u0027, \u0027React\u0027, \u0027Node.js\u0027],\r\n contact: {\r\n email: \u0027alice.work@example.com\u0027,\r\n },\r\n preferences: {\r\n theme: \u0027dark mode\u0027,\r\n },\r\n};\r\nconst finalObject = {\r\n\t...firstObject,\r\n \t...secondObject\r\n};","IsDeferred":false},{"Name":"Using Object.assign","Code":"const firstObject = {\r\n name: \u0027Alice\u0027,\r\n age: 25,\r\n contact: {\r\n email: \u0027alice@example.com\u0027,\r\n phone: \u0027123-456-7890\u0027,\r\n },\r\n preferences: {\r\n language: \u0027English\u0027,\r\n timezone: \u0027UTC\u0027,\r\n },\r\n};\r\n\r\nconst secondObject = {\r\n job: \u0027Software Engineer\u0027,\r\n skills: [\u0027JavaScript\u0027, \u0027React\u0027, \u0027Node.js\u0027],\r\n contact: {\r\n email: \u0027alice.work@example.com\u0027,\r\n },\r\n preferences: {\r\n theme: \u0027dark mode\u0027,\r\n },\r\n};\r\nconst finalObject = Object.assign(firstObject, secondObject);","IsDeferred":false}]}