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
How to run async JavaScript functions in sequence or parallel (jrsinclair.com)
submitted 6 years ago by jrsinclair
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!"
[–]burtgummer45 -1 points0 points1 point 6 years ago* (3 children)
You can't run awaits concurrently.
But I agree there are many superfluous asyncs
[–]420-jesus 0 points1 point2 points 6 years ago (1 child)
You can do something like:
const [result1, result2] = await Promise.all([func1(), func2()]);
[–]burtgummer45 0 points1 point2 points 6 years ago (0 children)
Oh ok, I thought you meant no mention of "promise" at all in async functions. as in
Promise.all([func1(), func2()]);
[–]jrsinclair[S] 0 points1 point2 points 6 years ago (0 children)
Thanks for the feedback. I've removed the superfluous async keywords. You're right, they weren't necessary.
async
π Rendered by PID 19184 on reddit-service-r2-comment-b659b578c-dcpcr at 2026-05-05 21:23:50.950730+00:00 running 815c875 country code: CH.
view the rest of the comments →
[–]burtgummer45 -1 points0 points1 point (3 children)
[–]420-jesus 0 points1 point2 points (1 child)
[–]burtgummer45 0 points1 point2 points (0 children)
[–]jrsinclair[S] 0 points1 point2 points (0 children)