{"ScriptPreparationCode":"class Iterator1 {\r\n array = Array.from({ length: 500_000 }, () =\u003E Math.floor(Math.random() * 500) \u002B 1);\r\n \r\n iterate() {\r\n let sum = 0;\r\n for (let i = 0; i \u003C this.array.length; \u002B\u002Bi) sum \u002B= this.array[i];\r\n }\r\n}\r\n\r\nconst Iterator2 = function() {};\r\n\r\nIterator2.prototype.array = Array.from({ length: 500_000 }, () =\u003E Math.floor(Math.random() * 500) \u002B 1);\r\n\r\nIterator2.prototype.iterate = function() {\r\n let sum = 0;\r\n for (let i = 0; i \u003C this.array.length; \u002B\u002Bi) sum \u002B= this.array[i];\r\n};","TestCases":[{"Name":"Class","Code":"let iterator = new Iterator1();\r\nfor (let i = 0; i \u003C 100; \u002B\u002Bi) {\r\n iterator.iterate();\r\n}","IsDeferred":false},{"Name":"Function \u002B Prototype","Code":"let iterator = new Iterator2();\r\nfor (let i = 0; i \u003C 100; \u002B\u002Bi) {\r\n iterator.iterate();\r\n}","IsDeferred":false}]}