{"ScriptPreparationCode":"function Thing(prop1, prop2) {\r\n this.prop1 = prop1;\r\n this.prop2 = prop2;\r\n}\r\nThing.prototype.doSomething = function () {\r\n this.prop1 \u002B= 1;\r\n this.prop2 ||= true;\r\n};\r\n\r\n\r\nlet proto = {\r\n doSomething() {\r\n this.prop1 = 1;\r\n this.prop2 = true;\r\n }\r\n}\r\n\r\nfunction createThing(prop1, prop2) {\r\n return Object.create(proto, {\r\n prop1: {\r\n value: prop1,\r\n writable: true\r\n },\r\n prop2: {\r\n value: prop2,\r\n writable: true\r\n }\r\n });\r\n}\r\n\r\nfunction literalThing(prop1, prop2) {\r\n return {\r\n prop1,\r\n prop2,\r\n __proto__: proto\r\n };\r\n}\r\n\r\nfunction spreadThing(props) {\r\n return {\r\n ...props,\r\n __proto__: proto\r\n };\r\n}\r\n\r\nfunction createAndAssignThing(prop1, prop2) {\r\n return Object.assign(Object.create(proto), {\r\n prop1,\r\n prop2\r\n });\r\n}","TestCases":[{"Name":"new","Code":"new Thing().doSomething();","IsDeferred":false},{"Name":"object.create","Code":"createThing().doSomething();","IsDeferred":false},{"Name":"object literal\u002Bproto","Code":"literalThing().doSomething();","IsDeferred":false},{"Name":"object.create\u002Bobject.assign","Code":"createAndAssignThing().doSomething();","IsDeferred":false},{"Name":"spread\u002Bproto","Code":"spreadThing({prop1: 0, prop2: false}).doSomething();","IsDeferred":false}]}