> For the complete documentation index, see [llms.txt](https://lochiwei.gitbook.io/web/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://lochiwei.gitbook.io/web/js/concept/execution-context/running-execution-context.md).

# running execution context

🚧 施工中

[JS](/web/js.md) ⟩ [concept](/web/browser/concepts.md) ⟩ [execution context](/web/js/concept/execution-context.md) ⟩ running execution context

{% hint style="success" %} <mark style="color:yellow;">**At any point in time**</mark>, there is <mark style="color:red;">**at most**</mark>**&#x20;**<mark style="color:yellow;">**one**</mark> [execution context](/web/js/concept/execution-context.md) that is actually <mark style="color:yellow;">**executing**</mark> code. This is known as the <mark style="color:purple;">**running execution context**</mark>.

📘 [JS spec](/web/master/ref/js-spec.md) ⟩ 8.2 [Execution Contexts](https://262.ecma-international.org/6.0/#sec-execution-contexts)
{% endhint %}

{% tabs %}
{% tab title="⭐️ 重點" %}
{% hint style="success" %}
A <mark style="color:yellow;">**stack**</mark> (call stack) is used to <mark style="color:yellow;">**track**</mark> [execution context](/web/js/concept/execution-context.md)(s). The <mark style="color:purple;">**running execution context**</mark> is always the <mark style="color:yellow;">**top**</mark> element of this stack.
{% endhint %}
{% endtab %}

{% tab title="👥 相關" %}

* [lexical environment](/web/js/concept/execution-context/lexical-environment.md) is <mark style="color:yellow;">**part**</mark> of <mark style="color:purple;">**execution context**</mark>.
  {% endtab %}

{% tab title="📗 參考" %}

* [ ] Anil ⟩ [Scope, Lexical Environment and Scope Chain in JavaScript](https://medium.com/@anilakgunes/scope-lexical-environment-and-scope-chain-in-javascript-559aadb7dca8) ⭐️
  {% endtab %}

{% tab title="📘 手冊" %}

* [ ] [JS spec](/web/master/ref/js-spec.md) ⟩&#x20;
  * [ ] [Execution Contexts](https://262.ecma-international.org/6.0/#sec-execution-contexts)
  * [ ] [running execution context](https://tc39.es/ecma262/#running-execution-context)
    {% endtab %}

{% tab title="🚧" %}

* [ ] call stack
* [x] running execution context
  {% endtab %}
  {% endtabs %}
