I am new to JS so please forgive my lack of understanding.
Suppose I work with MongoDB and I want to fetch details from a particular database in an asynchronous manner.
I would love to understand how this happens in JavaScript because the language is defined as a single threaded.
for example to execute this line asynchronously:
myCursor = db.inventory.find( {} )
I have read about the subject a lot and I understand that some asynchronous functions like setTimeOut are executed by Web API'S. Will each asynchronous function be the responsibility of the web APIs?
Many thanks