what is execution context in javascript
js is,
— synchronous
— single-threaded
execution context (EC)
→ the ‘environment’ in which a function executes in
→ everything in JS happens in the execution context
→ every time a function is invoked a new execution context is pushed into the call stack
2 parts of EC ->
1. memory component (a.k.a variable environment)
— where all functions and variables are stored as key-value pairs
2. code component (a.k.a thread of execution)
— component in which code executes one line at a time

call stack (CS)
→ maintains the order of execution of the execution contexts
→ a.k.a execution stack/ program stack/ control stack/ runtime stack/ machine stack.

if you liked this article or found it useful, a follow would be much appreciated. Alternatively, you could buy me a coffee! All the support is much appreciated. :-)