Javascript- Execution Context

Sanjana Human In Tech
1 min readOct 23, 2023

--

In JavaScript, an execution context is a crucial concept that defines the environment in which your code is executed.

Javascript is a single-threaded, synchronous language. Every Javascript code runs inside the execution context which is a container.

Execution Context is composed of two components.

  1. Memory Component also known as Variable Enviornment.
  2. The code component is also known as the Thread of context.
Execution context

Memory components consist of Key value pair and functions are stored.
The variable environment is where all the variables and Functions are stored.

The code component consists of lines of code. It executes one line of code at a time. It is also called a thread of execution means each line of code is executed one by one.

Javascript executes one command at a time and synchronous means one line executed at a time that is the way javascript is synchronous and single-threaded is the concept.

Thank you for reading this article! Don’t forget to clap 👏 .

If you have any queries related to ReactNative, I’m always happy to help you. You can reach me on LinkedIn and gmail.

Happy Learning🚀 Happy Coding💻.

--

--

Sanjana Human In Tech
Sanjana Human In Tech

Written by Sanjana Human In Tech

A React Native front-end enthusiast and dedicated development engineer, eager to expand knowledge on development techniques and collaborate with others.

No responses yet