Async iterators and the for await..of loop
Widely available since 2022-07-15
Asynchronous iterator objects, such as those returned by promises or generator functions, are iterable with the for await .. of
loop.
Learning resources on MDN
Browser support
- Chrome 63 Released on 2017-12-06
- Chrome Android 63 Released on 2017-12-05
- Edge 79 Released on 2020-01-15
- Firefox 57 Released on 2017-11-14
- Firefox for Android 57 Released on 2017-11-28
- Safari 12 Released on 2018-09-17
- Safari on iOS 12 Released on 2018-09-17
Specifications
- ECMAScript Language Specification (#sec-asynciteratorprototype), from TC39 (Ecma International).
- ECMAScript Language Specification (#sec-for-in-and-for-of-statements), from TC39 (Ecma International).