{"ScriptPreparationCode":null,"TestCases":[{"Name":"closures","Code":"function createClosure(one, two) {\r\n \tlet result = null;\r\n \r\n \treturn {\r\n compute() {\r\n result = one * two * one * two;\r\n },\r\n \r\n printResult() {\r\n console.log(result)\r\n }\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] = createClosure(Math.random(), Math.random()); \r\n \tcontents[i].compute();\r\n\tcontents[i].printResult();\r\n}\r\n","IsDeferred":false},{"Name":"classes","Code":"class MyClass {\r\n \tresult = null;\r\n \r\n \tconstructor(one, two) {\r\n \t\tthis.one = one;\r\n\t \tthis.two = two;\r\n }\r\n \r\n\tcompute() {\r\n\t\tthis.result = this.one * this.two * this.one * this.two;\r\n\t}\r\n\r\n\tprintResult() {\r\n\t\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 MyClass(Math.random(), Math.random()); \r\n \tcontents[i].compute();\r\n\tcontents[i].printResult();\r\n}\r\n","IsDeferred":false}]}