Once the async task completes, its callback is pushed into the Event Loop queue for execution. 𝗣𝗼𝗶𝗻𝘁𝘀 𝘁𝗼 𝗿𝗲𝗺𝗲𝗺𝗯𝗲𝗿: • Synchronous code executes line-by-line • Asynchronous code prevents ...
To understand that, we first need to understand synchronous and asynchronous behaviour Synchronous: Javascript executes code line by line, and it waits for one line to finish before moving to the next ...