Async iterators will enable JavaScript engineers to read steams like lines of text from a web service or a file. It will be worth reading my previous post understanding sync iterators first before carrying on.
It may seem plausible for a for-of
loop to iterate through lines in a file but ultimately it can’t execute until it has received the whole contents.
for (const line of fetchFile(fileName)) { console.log(line); }