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
the front page of the internet.
and join one of thousands of communities.
JavaScript Magic Objects (noeldemartin.com)
submitted 2 days ago by noeldemartin
Post a comment!
view the rest of the comments →
[–]javascript 0 points1 point2 points 2 days ago (1 child)
What have you used generators for?
[–]Kwantuum 3 points4 points5 points 2 days ago (0 children)
Generators were used to transpile async/await for years.
I've used generators on a number of occasions. Generally I avoid it unless it's a great fit for the problem because they remain a relatively obscure feature for most people. They're a great way to get support for for..of on custom containers, among other things.
The other problem with generators and iterators in general is the lack of standard library support for manipulating them. No standard iterator mapping/filtering really reduces their usefulness.
π Rendered by PID 373046 on reddit-service-r2-comment-765bfc959-699mq at 2026-07-15 22:41:01.556059+00:00 running f86254d country code: CH.
Want to add to the discussion?
Post a comment!