{"ScriptPreparationCode":null,"TestCases":[{"Name":"closure1","Code":"function MyFirstClass (one, two) {\r\n let _one = one;\r\n \tlet _two = two;\r\n \tlet _result = null;\r\n\r\n this.compute = function () {\r\n _result = _one * _two * _one * _two;\r\n }\r\n \r\n this.printResult = function () {\r\n\t\tconsole.log(_result); \r\n }\r\n}\r\n\r\nconst amt = 200;\r\nlet contents = new Array(amt);\r\n\r\nfor (let i = 0; i \u003C amt; i \u002B\u002B) {\r\n\tcontents[i] = new MyFirstClass(Math.random(), Math.random()); \r\n \tcontents[i].compute();\r\n\tcontents[i].printResult();\r\n}\r\n\r\n\r\n\r\n","IsDeferred":false},{"Name":"prototype1","Code":"function MyFirstProtoClass (one, two) {\r\n this._one = one;\r\n \tthis._two = two;\r\n \tthis._result = null;\r\n}\r\n\r\nMyFirstProtoClass.prototype.compute = function (){\r\n\tthis._result = this._one * this._two * this._one * this._two;\r\n};\r\n\r\nMyFirstProtoClass.prototype.printResult = function (){\r\n\tconsole.log(this._result);\r\n};\r\n\r\n\r\nconst amt = 200;\r\nlet contents = new Array(amt);\r\n\r\nfor (let i = 0; i \u003C amt; i \u002B\u002B) {\r\n\tcontents[i] = new MyFirstProtoClass(Math.random(), Math.random()); \r\n \tcontents[i].compute();\r\n\tcontents[i].printResult();\r\n}\r\n\r\n\r\n\r\n","IsDeferred":false}]}