other example,
this generator takes a string and produces its vowels one by one:</p>
<div class="code-sample lang-js" title="generator-vowels-while.js">
<div class="highlight"><pre><span></span><code><span class="kd">function</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="nx">getVowels</span><span class="w"> </span><span class="p">(</span><span class="nx">text</span><span class="p">)</span><span class="w"> </span><span class="p">{</span>
<span class="w">  </span><