JavaScript Iterators
<p>I was going through MDN (Mozilla Developer Network) and came across <a href="https://developer.mozilla.org/en-US/docs/JavaScript/Guide/Iterators_and_Generators" rel="nofollow">Iterators and generators</a></p>

<p>So naturally, I tried the snippets of code given in the page on Google Chrome v21.  To be specific, this code:</p>

<pre><code>var it = Iterator(lang);
for (var pair in it)
  print(pair); // prints each [key, value] pair in turn
</code></pre>

<p>However, the console returns this error message:</p>

<pre><code>ReferenceError: Iterator is not defined
</code></pre>

<p>Why's that?  Is the Iterator function deprecated or something? Am I missing a point?  Thank you for your help and time :-)</p>
