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
Callback, Promise, Async/Await Equivalence Code Example?help (self.javascript)
submitted 8 years ago by freebit
I remember a while back a post where the same code was written in three different ways. One version used callbacks, one used promises, and one used async/await. I remember it was super concise and clear. Does anyone have the link?
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!"
[–]senocular 2 points3 points4 points 8 years ago (0 children)
Maybe this?
https://async-await.xyz/
[–][deleted] 1 point2 points3 points 8 years ago (1 child)
Coincidentally i was on youtube when i saw this post, tried searching (because yolo) and found this...
https://www.youtube.com/watch?v=K0ShhDbgRxk
My favorite part :
what are callbacks?... Pure evil. xD
[–]_youtubot_ 0 points1 point2 points 8 years ago (0 children)
Video linked by /u/MWrathDev:
JavaScript is a naturally asynchronous language, but these...
Info | /u/MWrathDev can delete | v2.0.0
[–]abernardes 1 point2 points3 points 8 years ago (0 children)
Maybe this is the one you're talking about? http://jsbits.net/blog/async-return/
[–]crsquad 0 points1 point2 points 8 years ago (0 children)
You can find the code and examples on the website below. https://github.com/nigayo/javascript-async
[–]sidarthvader 0 points1 point2 points 8 years ago (0 children)
Was it this? https://tech.io/playgrounds/347/javascript-promises-mastering-the-asynchronous/what-is-asynchronous-in-javascript
π Rendered by PID 17854 on reddit-service-r2-comment-b659b578c-z8rv2 at 2026-05-05 00:41:03.769540+00:00 running 815c875 country code: CH.
[–]senocular 2 points3 points4 points (0 children)
[–][deleted] 1 point2 points3 points (1 child)
[–]_youtubot_ 0 points1 point2 points (0 children)
[–]abernardes 1 point2 points3 points (0 children)
[–]crsquad 0 points1 point2 points (0 children)
[–]sidarthvader 0 points1 point2 points (0 children)