ECMAScript 2015 (ES6) offers the iterable
Set objects, and various DOM APIs are now also iterable, such as
StyleSheetList (since Firefox 31),
CSSRuleList (since Firefox 32),
URLSearchParams (since Firefox 44),
FormData (since Firefox 44),
Headers (since Firefox 44),
DOMTokenList (since Firefox 50).
Those objects can be used in conjunction with the
for...of statement without the
Iterator constructor. For generic, non-iterable objects, you can simply replace
Iterator with the new, standard
Object.entries method to make them iterable. See the standard iterators and generators for details.