JavaScript Professional — Medium
Key points
- The generator function yields the results of Promises resolved with n * 10
- The `for await` loop collects the yielded values in the results array
- The final output is an array with values [10, 20, 30]
Ready to go further?
Related questions
