{"ScriptPreparationCode":"const sourceObjects = [];\r\nconst destObjects = [];\r\n\r\nfor (let i = 0; i \u003C 500; \u002B\u002Bi) {\r\n const sourceObject = {};\r\n for (let j = 0; j \u003C 10; \u002B\u002Bj) {\r\n sourceObject[Math.random().toFixed(0) * 1000] = Math.random().toFixed(0) * 1000;\r\n }\r\n \r\n const destObject = {};\r\n for (let j = 0; j \u003C 5; \u002B\u002Bj) {\r\n destObject[Math.random().toFixed(0) * 1000] = Math.random().toFixed(0) * 1000;\r\n }\r\n \r\n sourceObjects.push(sourceObject);\r\n destObjects.push(destObject);\r\n}\r\n\r\nwindow.sourceObjects = sourceObjects;\r\nwindow.destObjects = destObjects;","TestCases":[{"Name":"Object.assign","Code":"const sourceObjects = window.sourceObjects;\r\nconst destObjects = window.destObjects;\r\n\r\nfor (let i = 0; i \u003C sourceObjects.length; \u002B\u002Bi) {\r\n const destObject = destObjects[i];\r\n const sourceObject = sourceObjects[i];\r\n \r\n const newObject = Object.assign(destObject, sourceObject);\r\n}","IsDeferred":false},{"Name":"Polyfill Extend","Code":"function objForEachKey(target, callbackfn) {\r\n if (target) {\r\n for (var prop in target) {\r\n if (Object.prototype.hasOwnProperty.call(target, prop)) {\r\n callbackfn.call(target, prop, target[prop]);\r\n }\r\n }\r\n }\r\n}\r\n\r\nfunction extend(obj, obj2, obj3, obj4, obj5) {\r\n // Variables\r\n var extended = {};\r\n var deep = false;\r\n var i = 0;\r\n var length = arguments.length;\r\n var objProto = Object.prototype;\r\n var theArgs = arguments;\r\n // Check if a deep merge\r\n if (objProto.toString.call(theArgs[0]) === \u0022[object Boolean]\u0022) {\r\n deep = theArgs[0];\r\n i\u002B\u002B;\r\n }\r\n // Loop through each object and conduct a merge\r\n for (; i \u003C length; i\u002B\u002B) {\r\n var obj = theArgs[i];\r\n objForEachKey(obj, function (prop, value) {\r\n extended[prop] = value;\r\n });\r\n }\r\n return extended;\r\n}\r\n\r\nconst sourceObjects = window.sourceObjects;\r\nconst destObjects = window.destObjects;\r\n\r\nfor (let i = 0; i \u003C sourceObjects.length; \u002B\u002Bi) {\r\n const destObject = destObjects[i];\r\n const sourceObject = sourceObjects[i];\r\n \r\n const newObject = extend(destObject, sourceObject);\r\n}\r\n","IsDeferred":false}]}