Practically speaking it’s easier to grasp. The article in question makes a good point of playing around with the concepts to dispel the magic.
Asnyc/await is just syntactic sugar for promises.
Promises are just wrappers around callbacks.
Callbacks are used to hook functions into an event loop. The dispatching/scheduling is handled there.
So really when you use async/await, you’re just writing pseudo-sequential code that gets turned into callback code.
This is also why a function can only await if it’s marked as async. It’s callbacks, function coloring leaking out so to speak.
This part never really made it into my understanding of the concept. For practical purposes I've been completely fine with not thinking about it at all. My function is called at some point, that's all what I find really matters. Thinking about the event loop opens up a can of worms I find more confusing than useful.
Probably for daily usage this might be true, but there are definitely cases when you're using JavaScript and not understanding the event loop makes it hard to understand why things are happening. Example:
setTimeout(() => console.log('hello'), 0)
console.log('world')
You'd normally expect this to print "hello" and then "world" since the "sleep time" for the setTimeout is set to 0, but thanks to the event loop, the result will be "world" and "hello". Very simple example, but in real life code bases and beginner JavaScript developers, in can be confusing at times.I've seen smart and capable programmers who are not used to UI programming and async in general who struggle with callbacks and IoC initially. You can draw a simple picture on a whiteboard to explain the overall concept to give them something to grasp on.