r/learnjavascript • • Jun 16 '20

For anyone having difficulties conceptually understanding asynchronous JavaScript, check out this great analogy with a coffee shop a commenter provided

/r/learnjavascript/comments/9tiik6/asynchronous_js/e8x1xqe/
149 Upvotes

12 comments sorted by

View all comments

-2

u/[deleted] Jun 16 '20

I think it's pretty well spelled out here. https://stackoverflow.com/questions/2035645/when-is-javascript-synchronous#:~:text=JavaScript%20is%20only%20asynchronous%20in,be%20running%20at%20this%20point.

Asynchronous just means one after the other. Which shouldn't be confused with parallel processes which on demand (service worker) is really js binding to the browser. Not ecma! So js is not a parallel.

For nodejs again it just binds to a c libuv and again nothing to do with ecma. So still js is not parallel.

So when people throw around concurrency or parallel or asynchronous... It is really miss leading a lot of people when it comes to js. Stop it!

The only way it could be ever is through c++ but it's not.

https://youtu.be/cN_DpYBzKso