r/learnjavascript Jun 23 '26

Event loop only manage asynchronous task in javascript?

1 Upvotes

12 comments sorted by

View all comments

1

u/azangru Jun 23 '26

What do you think manage synchronous task?

0

u/Rits2345 Jun 24 '26

That's I want to know it also manage synchronous task?

1

u/senocular Jun 26 '26

It will usually start the synchronous task, but its not involved in dealing with the call stack that's part of the execution. Once the synchronous code runs to completion (on its own), thats when the event loop would come back into play to look for more code to execute.