Assume execution context to be a big box / container where everything takes place(whole javascript code is executed).
It has 2 components in it:
- Memory: The place where all the variables and functions are stored as (key:value) pairs. Memory component is also known as variable environment.
- Code: The place where code is executed one line at a time. Code component is also known as Thread of Execution
NOTE: Javascript is not possible without this beautiful execution context.
- By single threaded, we mean JS can only run 1 command at a time
- By synchronous single threaded, we mean it can run 1 command at a time, in a specific order