> For the complete documentation index, see [llms.txt](https://javascript-1.gitbook.io/javascript/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://javascript-1.gitbook.io/javascript/javascript-runtime.md).

# JavaScript RunTime

JavaScript run time is created when the code is executed. (Call Stack + Memory Heap + Web API + Event Loop + Call back Queue)

### Web API:  **Asynchronous functionality.**

![Asynchronous functionality.](https://2037876129-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LdbqCujxzeJqeQqlbM2%2F-Lgq4IA9AMA6sTY-WosN%2F-Lgq7M4iMqbnueqI7hU6%2Fimage.png?alt=media\&token=6444fcac-106e-4c90-ab13-562e0bae8ea6)

### Working process:

* When the code executed, JavaScript run time is created.
* When the function are pushed into the call stack, the functions belonged to Web API will be send to the Web API by call stack for he process.
* When the web API receives the function, it will process the functions, and then it is send to the call back queue.
* Then the processed function in the call back queue will be send to the event loop to send to the call stack.
* After receiving the processed function, event loop pushes the function to the call stack, when it is empty. ( waits until the call stack is empty )
* Then the function will be executed in the call stack.
