---
description: 🚧 under construction
---

# variable shadowing

[JS](..) ⟩ [variable]() ⟩ shadowing

{% tabs %}
{% tab title="🔴 主題" %}
* [param-by-var](declare/var/param-by-var "mention") - is it possible to shadow function parameters:question:
* [var-in-block-cant-shadow-outer-let](declare/var/var-in-block-cant-shadow-outer-let "mention"):exclamation:
{% endtab %}

{% tab title="👥 相關" %}
* [redeclare](../grammar/declare/redeclare "mention")
  * [redeclare](redeclare "mention")
    * [var](redeclare/var "mention")
    * [let](redeclare/let "mention")
  * [redeclare](../val/func/declare/redeclare "mention")
    * [function-in-block-fib](../val/func/declare/function-in-block-fib "mention") - treated as "<mark style="color:purple;">**redeclaration**</mark>" in [sloppy mode](../concept/env/js-engine/mode/sloppy-mode).
{% endtab %}

{% tab title="🗣 討論" %}
* [shadowing parameters by local variables?](https://stackoverflow.com/questions/74154964/shadowing-parameters-by-local-variables) (my question)
{% endtab %}

{% tab title="📗 參考" %}
* [ ] [ydkjs-scope-and-closures-v.2](../../master/ref/book/you-dont-know-js-series-v.2/ydkjs-scope-and-closures-v.2 "mention") ⟩ Ch. 8 ⟩ [Parameter Scope](https://github.com/getify/You-Dont-Know-JS/blob/2nd-ed/scope-closures/apA.md#parameter-scope)
{% endtab %}
{% endtabs %}
