I was going through MDN (Mozilla Developer Network) and came across Iterators and generators
So naturally, I tried the snippets of code given in the page on Google Chrome v21. To be specific, this code:
var it = Iterator(lang);
for (var pair in it)
print(pair); // prints each [key, value] pair in turn
However, the console returns this error message:
ReferenceError: Iterator is not defined
Why's that? Is the Iterator function deprecated or something? Am I missing a point? Thank you for your help and time :-)