We can make Fetch or any other Async request with JavaScript, But Java script is itself a single threaded quite confusing
-
2ECMAScript is single threaded, however the host environment (e.g. JavaScript) can provide additional asynchronous functionality like XMLHttpRequest and [*Fetch*](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API). – RobG Feb 19 '18 at 06:09
5 Answers
You're confusing asynchronous programming with multi threaded programming. See this answer: Does async programming mean multi-threading?

- 1,116
- 5
- 17
- 41
Javascript runs on a core which is single threaded and its also a event driven language that make all request into events, application running in node js runs asynchronously using node event loop and event loop where looks upon the events and process them asynchronously.
So the request you make taken by events and processed asynchronously.

- 2,081
- 1
- 17
- 37
The trick is that the browser / nodejs instance has other threads for network handling, file reading etc. So it actually is multithreaded, but you dont need to deal with that as js opens these threads for you in the background. You just work with promises and callbacks to get the results out of these threads.

- 132,000
- 20
- 149
- 151
Browser eventLoop:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/EventLoop
A very interesting property of the event loop model is that JavaScript, unlike a lot of other languages, never blocks.

- 138
- 1
- 1
- 9