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

# let redeclaration

redeclares the same identifier with "let" in the same/inner scope.

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

{% hint style="warning" %}
([redeclaration](/web/js/grammar/declare/redeclare.md)) <mark style="color:yellow;">**redeclares**</mark> the <mark style="color:red;">**same**</mark> [identifier](/web/js/grammar/token/id.md) with [let](/web/js/variable/declare/let.md) in the <mark style="color:red;">**same**</mark> or <mark style="color:yellow;">**inner**</mark> [scope](/web/js/scope.md).
{% endhint %}

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

* :white\_check\_mark:[let redeclaration not allowed even in sloppy mode❗️](/web/js/variable/declare/let/no-redeclare.md)
* :white\_check\_mark:[let can't shadow parameter even in sloppy mode❗️](/web/js/variable/declare/let/let-cant-shadow-param.md)
  {% endtab %}

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

* [variable declaration](/web/js/variable/declare.md) ⟩ [let](/web/js/variable/declare/let.md)
* [var redeclaration](/web/js/variable/redeclare/var.md)
* :exclamation:[var can shadow parameter even in strict mode❗️](/web/js/variable/declare/var/param-by-var.md)
  {% endtab %}

{% 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 %}
  {% endtabs %}
