3 ms·
yes generators can help you control the flow as you do async programing, but you can't use generators to do something like an ajax function which gives you an a
by cwmma 12y ago
yes generators can help you control the flow as you do async programing, but you can't use generators to do something like an ajax function which gives you an async value, you'd need promises or something for that, generators allow you do use those async function is a more natural way.
- inglor 12y agoPromises _are_ an async value. By yielding promises you're doing exactly that :)