> 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/variable/redeclare.md).

# variable redeclaration

🚧 under construction

[JS](/web/js.md) ⟩ [variable](/web/js/variable.md) ⟩ redeclaration

{% hint style="info" %}
🚧 ([redeclaration](/web/js/grammar/declare/redeclare.md))
{% endhint %}

{% tabs %}
{% tab title="⭐️ 重點" %}
{% hint style="warning" %}
(:exclamation:[redeclaration](/web/js/grammar/declare/redeclare.md) ) JS is <mark style="color:green;">**lenient**</mark> with [var](/web/js/variable/declare/var.md), <mark style="color:red;">**strict**</mark> with [let](/web/js/variable/declare/let.md).

* [var redeclaration applied even in strict mode❗️](/web/js/variable/declare/var/redeclare.md), even in [strict mode](/web/js/concept/env/js-engine/mode/strict-mode.md):exclamation:
* [let redeclaration not allowed even in sloppy mode❗️](/web/js/variable/declare/let/no-redeclare.md), even in [sloppy mode](/web/js/concept/env/js-engine/mode/sloppy-mode.md):exclamation:
  {% endhint %}
  {% endtab %}

{% tab title="🔴 主題" %}

* [var redeclaration](/web/js/variable/redeclare/var.md)
  * [var redeclaration applied even in strict mode❗️](/web/js/variable/declare/var/redeclare.md) (<mark style="color:yellow;">**even in strict mode**</mark>):exclamation:
  * [var can shadow parameter even in strict mode❗️](/web/js/variable/declare/var/param-by-var.md) - <mark style="color:yellow;">**parameters**</mark> <mark style="color:green;">**can**</mark> be <mark style="color:yellow;">**shadowed**</mark> by "<mark style="color:yellow;">**var**</mark>":exclamation:
* [let redeclaration](/web/js/variable/redeclare/let.md)
  * [let redeclaration not allowed even in sloppy mode❗️](/web/js/variable/declare/let/no-redeclare.md) (<mark style="color:yellow;">**even in sloppy mode**</mark>):exclamation:
  * [var can shadow parameter even in strict mode❗️](/web/js/variable/declare/var/param-by-var.md) - <mark style="color:yellow;">**parameters**</mark> <mark style="color:red;">**can't**</mark> be <mark style="color:yellow;">**shadowed**</mark> by "<mark style="color:yellow;">**let**</mark>":no\_entry:
    {% endtab %}

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

* [variable declaration](/web/js/variable/declare.md)
* [function redeclaration](/web/js/val/func/declare/redeclare.md)
* [variable shadowing](/web/js/variable/shadow.md)
  {% endtab %}
  {% endtabs %}
