How JavaScript Works ?

How JavaScript Works ?

Execution Context

Hola Coders!

In this article, we will know about the working of JavaScript😎

Just remember one thing 👇

Everything inside JS happens inside Execution Context

What is Execution Context ?

Execution context is a container which has two components memory component and code component.

  • Memory Component ( Variable environment )
  • Code Component ( Thread of Execution )

image.png

Memory Component

It contains all the variables and functions in key : value pair

Code Component

It is the part of execution context where code is executed one line at a time.

JS is a synchronous single-threaded language

This is the gist of JS that JS is a synchronous single-threaded language. It means that it executes one command at a time and in a specific order. It executes future JS statements after current statements are executed.

The End

I hope you enjoyed the article and had a good learning experience.

Follow for more articles and keep sharing👩

Keep coding

Linkedin

hashnode blogs