# Execution Context

`Execution context (EC)` is defined as the environment in which JavaScript code is executed.

`Execution context stack (ECS)`: Execution context stack is a stack data structure to store all the execution stacks created while executing the JS code.

This topic is advanced, but a clear understanding of Execution Context and Execution Context Stack helps you in understanding how JavaScript codes are executed.

## Recommended Reading

* [JavaScript: What Is The Execution Context? What Is The Call Stack?](https://www.valentinog.com/blog/js-execution-context-call-stack/)
* [Execution context, Scope chain and JavaScript internals](https://hackernoon.com/execution-context-in-javascript-319dd72e8e2c)
* [What is the Execution Context & Stack in JavaScript?](http://davidshariff.com/blog/what-is-the-execution-context-in-javascript/)
* [Understanding Execution Context and Execution Stack in JavaScript](https://blog.bitsrc.io/understanding-execution-context-and-execution-stack-in-javascript-1c9ea8642dd0)
* [JavaScript, the core](http://dmitrysoshnikov.com/ecmascript/javascript-the-core-2nd-edition/)
* [The Ultimate Guide to Hoisting, Scopes, and Closures in JavaScript](https://tylermcginnis.com/ultimate-guide-to-execution-contexts-hoisting-scopes-and-closures-in-javascript/)
* [Execution context and the call stack — visually illustrated by a slice of tasty cake](https://medium.freecodecamp.org/execution-context-and-the-call-stack-visually-illustrated-by-a-slice-of-tasty-cake-14f9a64dc460)

