DEV Community

Discussion on: If Javascript Is Single Threaded, How Is It Asynchronous?

Collapse
 
aleksandar15 profile image
Aleksandar15

I think you are wrong at this part ...we can thank the Javascript engine (V8, Spidermonkey, JavaScriptCore, etc...) for that, which has Web API....

We don't thank JS Engine for that, because Web API is not part of the JS Engine but the JS runtime environment provided by the Browser, also provided by the browser is the JS Engine itself (V8 for Chrome) and Callback Queue and the Event Loop.
The JS (V8) Engine is made up of Memory Heap & Call Stack.

Furthermore, the purpose of the JS engine is to parse/translate source code that we developers write into machine code that allows a computer to perform specific tasks on its hardware level.