DEV Community

ayan
ayan

Posted on

How JavaScript works? Execution Context...

__

_Everything in JavaScript happens inside an execution context
_

We can assume execution context is a big box in which whole JavaScript code is executed.
Execution context contains two components first one called Memory Component and second one is called code (
In first component all the variables and functions are placed in key value pairs. Function are also stored in memory component.

Image description
Second component is called code component also known as thread of execution.

Image description
for more details refer Namaste JavaScript

Top comments (0)