DEV Community

Discussion on: What is Scheduling in JavaScript?

Collapse
 
peerreynders profile image
peerreynders • Edited

these two things disturb and irritate a lot when learning JS.

Really? I'd flip it around and claim that until you understand JavaScript's event loop, task and microtask queues you're going to have a hard time understanding its bread-and-butter asynchronous behaviour given that it has to accomplish work concurrently on a single thread.

setTimeout and setInterval run on the Task queue, Promises (and therefore async/await) run on the microtask queue.

Resources:

Collapse
 
rahxuls profile image
Rahul

Helpful man. Thanks.