Javascript – How to access the last value in an async generator after a for await…of?
When using for await...of to iterate over an async generator, the final value (return value) seems to be consumed and inaccessible afterward. Here's a minimal example: async function* exampleGenerator() { let i = 1; while (true) { if (something) {…