{"ScriptPreparationCode":"function* createGenerator() {\r\n var i;\r\n for (i = 0; i \u003C 100; i\u002B\u002B) {\r\n yield i;\r\n }\r\n}\r\n\r\nfunction createClosure() {\r\n var i = 0;\r\n return {\r\n [Symbol.iterator]() {\r\n return this;\r\n },\r\n next() {\r\n var result;\r\n if (i \u003C 100) {\r\n result = {\r\n value: i,\r\n done: false\r\n };\r\n } else {\r\n result = {\r\n value: undefined,\r\n done: true\r\n };\r\n }\r\n i\u002B\u002B;\r\n return result;\r\n }\r\n };\r\n}","TestCases":[{"Name":"ES6 generator","Code":"var gen = createGenerator(),\r\n result;\r\nfor (result of gen) {\r\n window.result = result.value;\r\n}","IsDeferred":false},{"Name":"Closure polyfill","Code":"var gen = createClosure(),\r\n result;\r\nfor (result of gen) {\r\n window.result = result.value;\r\n}","IsDeferred":false}]}