Category "event-loop"

when is the callback passed to setTimeout put on the message queue?

setTimeout(callback, 1000) Is callback put on the message queue after 1000ms or is it put to the message queue immediately? If it is put to the message queue a

How does JavaScript call web APIs?

As far as I know, JavaScript's normal behavior when I call a web API just like the setTimeout 4 times: it should call the first one then add it to a queue wait

What is the difference between "event loop queue" and "job queue"?

I can not understand how the following code run. Why "1" is after "b" but "h" is after "3"? Should'n the order be: a, b, 1, 2, h, 3? Some articles said that the