{"ScriptPreparationCode":"class Rectangle {\r\n constructor(height, width) {\r\n this.height = height;\r\n this.width = width;\r\n }\r\n\r\n calcArea() {\r\n return this.height * this.width;\r\n }\r\n}\r\n\r\nvar r = new Rectangle(3, 4);","TestCases":[{"Name":"Iteration with blank object","Code":"var copy = {};\r\nfor(const prop in r) copy[prop] = r[prop];","IsDeferred":false},{"Name":"Object.assign with blank object","Code":"var copy = {};\r\nObject.assign(copy, r);","IsDeferred":false},{"Name":"Iteration with created object","Code":"var copy = Object.create(Object.getPrototypeOf(r));\r\nfor(const prop in r) copy[prop] = r[prop];","IsDeferred":false},{"Name":"Object.assign with created object","Code":"var copy = Object.create(Object.getPrototypeOf(r));\r\nObject.assign(copy, r);","IsDeferred":false},{"Name":"Iteration with blank object and prototype","Code":"var copy = {};\r\nObject.setPrototypeOf(copy, Object.getPrototypeOf(r));\r\nfor(const prop in r) copy[prop] = r[prop];","IsDeferred":false},{"Name":"Object.assign with blank object and prototype","Code":"var copy = {};\r\nObject.setPrototypeOf(copy, Object.getPrototypeOf(r));\r\nObject.assign(copy, r);","IsDeferred":false},{"Name":"Iteration with blank object and prototype prop","Code":"var copy = {};\r\ncopy.__proto__ = r.__proto__;\r\nfor(const prop in r) copy[prop] = r[prop];","IsDeferred":false},{"Name":"Object.assign with blank object and prototype prop","Code":"var copy = {};\r\ncopy.__proto__ = r.__proto__;\r\nObject.assign(copy, r);","IsDeferred":false}]}