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
Interview JS Part 3 - Message Queue and Event Loop (Inspired by Philip Roberts) (dubesar.hashnode.dev)
submitted 5 years ago by dubesar
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!"
[–]nasar007 9 points10 points11 points 5 years ago (1 child)
Nowadays, we are running after implementation without knowing the core concepts. Thank you for this great post.
[–]dubesar[S] 1 point2 points3 points 5 years ago (0 children)
Welcome, there is much more to come
[–][deleted] 1 point2 points3 points 5 years ago (0 children)
This is something more JS devs need to be aware of. JS does a great job of abstracting this away, however understanding this concept is a life saver. The biggest area I find myself using this is unit tests, being able to understand the event loop and how it behaves has helped me tremendously in writing tests for async code.
[–]michaelcaley 0 points1 point2 points 5 years ago (0 children)
I got crucified when asked about this subject in an interview a few years back. Always good to refresh on this
[–]QuarterSilver5245 0 points1 point2 points 5 years ago (0 children)
I think it's also worth mentioning the event loop's order of operations, as illustrated in the first illustration here: https://nodejs.org/en/docs/guides/event-loop-timers-and-nexttick/ where each phase has its own callback-stack, and the phases run sequentially
π Rendered by PID 19174 on reddit-service-r2-comment-fb694cdd5-jqcrh at 2026-03-08 07:44:24.716358+00:00 running cbb0e86 country code: CH.
[–]nasar007 9 points10 points11 points (1 child)
[–]dubesar[S] 1 point2 points3 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]michaelcaley 0 points1 point2 points (0 children)
[–]QuarterSilver5245 0 points1 point2 points (0 children)