JavaScript Generators – How functions return a stream of results, yielding one result at a time
It was through inspecting some Python code that relied quite heavily that I suddenly realized the beauty of the ES6 concept of generators and the yield keyword. A generator …