# dynamic scope

[JS](https://lochiwei.gitbook.io/web/js) ⟩ [concepts](https://lochiwei.gitbook.io/web/browser/concepts) ⟩ [scope](https://lochiwei.gitbook.io/web/js/scope) ⟩ dynamic scope

{% hint style="success" %}
🚧

:point\_right: compare： [static-vs-dynamic](https://lochiwei.gitbook.io/web/js/scope/static-vs-dynamic "mention")
{% endhint %}

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

* [lexical-scope](https://lochiwei.gitbook.io/web/js/scope/lexical-scope "mention")
* [](https://lochiwei.gitbook.io/web/js/scope "mention") / [chain](https://lochiwei.gitbook.io/web/js/scope/chain "mention")
* [lexical-environment](https://lochiwei.gitbook.io/web/js/concept/execution-context/lexical-environment "mention")
  {% endtab %}

{% tab title="⭐️ 重點" %}
{% hint style="info" %}

* <mark style="color:purple;">**static scope**</mark>： C, Java, <mark style="color:yellow;">**JavaScript**</mark>, Python and Ruby.&#x20;
* dynamic scope： Perl.
  {% endhint %}
  {% endtab %}

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

* [ ] Wikipedia ⟩ [lexical scope vs. dynamic scope](https://en.wikipedia.org/wiki/Scope_\(computer_science\)#Lexical_scope_vs._dynamic_scope)
* [ ] Anil ⟩ [Scope, Lexical Environment and Scope Chain in JavaScript](https://medium.com/@anilakgunes/scope-lexical-environment-and-scope-chain-in-javascript-559aadb7dca8) ⭐️
  {% endtab %}
  {% endtabs %}
