{"ScriptPreparationCode":"function T(i) {\r\n this.counter = i;\r\n}\r\n \r\nT.prototype.myMethod = function() {\r\n if (this.counter == 20000) {\r\n console.log(\u0027Hey T!\u0027);\r\n }\r\n};\r\n \r\nfunction Tt(i) {\r\n this.counter = i;\r\n this.myMethod = function() {\r\n if (this.counter == 20000) {\r\n console.log(\u0027Hey Tt!\u0027);\r\n }\r\n };\r\n}\r\n\r\nfunction factoryPattern(i){\r\n var counter = i;\r\n function myMethod() {\r\n if (counter == 20000) {\r\n console.log(\u0027Hey Factory!\u0027);\r\n }\r\n }\r\n return {\r\n myMethod: myMethod\r\n }\r\n}\r\n","TestCases":[{"Name":"Using this","Code":"for (var i = 1; i \u003C= 100; i\u002B\u002B) {\r\n var x = new T(i);\r\n x.myMethod();\r\n}","IsDeferred":false},{"Name":"Using prototype","Code":"for (var i = 1; i \u003C= 100; i\u002B\u002B) {\r\n var x = new Tt(i);\r\n x.myMethod();\r\n}","IsDeferred":false},{"Name":"Using Factory","Code":"for (var i = 1; i \u003C= 100; i\u002B\u002B) {\r\n var x = factoryPattern(i);\r\n x.myMethod();\r\n}","IsDeferred":false}]}