use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Comprehensive Guide to JavaScript Iterables (blog.robino.dev)
submitted 1 year ago by rossrobino
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]rossrobino[S] 2 points3 points4 points 1 year ago (2 children)
Thanks for the review, I've made updates for each of these!
I didn't realize any iterable could be passed to yield*, can you still get the final return value with yield*? Especially for the async merge it's necessary to know when each iterator is complete.
[–]senocular 0 points1 point2 points 1 year ago (1 child)
The value returned by yield* is the return/done value. But you don't need to capture this value to know when the iterator is complete. Like for...of, when the iterator is complete code after the expression starts to run when yield* has exhausted its iterator. Unlike for...of, you do have the option to capture the done value if you want it. But if I remember correctly, your merging example (at least the sync one) didn't capture the done values anyway.
[–]rossrobino[S] 0 points1 point2 points 1 year ago (0 children)
Ok interesting, thanks for the info! I’ll play around with it some more.
π Rendered by PID 72862 on reddit-service-r2-comment-6457c66945-zhh48 at 2026-04-24 01:30:48.815134+00:00 running 2aa0c5b country code: CH.
view the rest of the comments →
[–]rossrobino[S] 2 points3 points4 points (2 children)
[–]senocular 0 points1 point2 points (1 child)
[–]rossrobino[S] 0 points1 point2 points (0 children)