{"ScriptPreparationCode":"const obj1 = { a: \u0022a\u0022 };\r\nconst obj2 = { b: \u0022b\u0022 };\r\n\r\nfunction _defineProperty(obj, key, value) {\r\n if (key in obj) {\r\n Object.defineProperty(obj, key, {\r\n value: value,\r\n enumerable: true,\r\n configurable: true,\r\n writable: true\r\n });\r\n } else {\r\n obj[key] = value;\r\n }\r\n\r\n return obj;\r\n}\r\n\r\nfunction ownKeys(object, enumerableOnly) {\r\n var keys = Object.keys(object);\r\n\r\n if (Object.getOwnPropertySymbols) {\r\n var symbols = Object.getOwnPropertySymbols(object);\r\n if (enumerableOnly) symbols = symbols.filter(function (sym) {\r\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\r\n });\r\n keys.push.apply(keys, symbols);\r\n }\r\n\r\n return keys;\r\n}\r\n\r\nfunction _objectSpread2(target) {\r\n for (var i = 1; i \u003C arguments.length; i\u002B\u002B) {\r\n var source = arguments[i] != null ? arguments[i] : {};\r\n\r\n if (i % 2) {\r\n ownKeys(Object(source), true).forEach(function (key) {\r\n _defineProperty(target, key, source[key]);\r\n });\r\n } else if (Object.getOwnPropertyDescriptors) {\r\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\r\n } else {\r\n ownKeys(Object(source)).forEach(function (key) {\r\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\r\n });\r\n }\r\n }\r\n\r\n return target;\r\n}\r\n\r\nwindow.obj1 = obj1;\r\nwindow.obj2 = obj2;\r\nwindow._objectSpread2 = _objectSpread2;","TestCases":[{"Name":"Using the spread operator","Code":"const finalObject = {\r\n\ta: \u0022a\u0022,\r\n \t...obj2\r\n};","IsDeferred":false},{"Name":"Using Object.assign","Code":"const finalObject = Object.assign({ a: \u0022a\u0022 }, obj2);","IsDeferred":false},{"Name":"Babel","Code":"_objectSpread2({ a: \u0022a\u0022 }, obj2);","IsDeferred":false}]}