sajad torkamani

The callback queue is provided by the JavaScript environment like a web browser or Node.js and is the place where async callbacks wait for their turn to go into the call stack and get executed.

The callback queue is one of four main components in a JavaScript environment which work together to allow JavaScript code to run in multiple threads despite JavaScript engines being single-threaded:

  1. Call stack
  2. Web APIs
  3. Callback queue
  4. Event loop
Tagged: JavaScript