javascript iterator and generator
<p>I have written below code:</p>

<pre><code>&lt;script type="text/javascript"&gt;
function testGenerator()
{
yield "first";
document.write("step1");
yield "second";
document.write("step2");
yield "third";
 document.write("step3");
 }
 var g = testGenerator();
document.write(g.next());
document.write(g.next());
 &lt;/script&gt;
</code></pre>

<p>My desired output: step1step2
But the above code show nothing on my html. Could any one help me to figure out what the mistake I have done here.</p>

<p>Thanks</p>
