"Everything in JavaScript happens inside an Execution Context"
Consider Execution Context as a box with 2 Columns as follows:
Memory Component or Variable Environment:
This is the place where all the variables & functions etc, are stored in the form of key-value pairs.
Code Component or Thread of Execution:
This is where our code is executed one line at a time.
"JavaScript is a Synchronous, single-threaded Language"
- It means JavaScript can execute one command at a time in a specific order.
This Blog is Inspired by "Namaste JavaScript" Series by Akshay Saini on Youtube.
ย