> 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/grammar/token/punctuator/semicolon/statements-that-must-end-with.md).

# statements that must end with ";"

[JS](/web/js.md) ⟩ [grammar](/web/js/grammar.md) ⟩ [token](/web/js/grammar/token.md) ⟩ [semicolon](/web/js/grammar/token/punctuator/semicolon.md) ⟩ statements end with ";"

{% hint style="success" %}
some [statement](/web/js/grammar/statement.md)s <mark style="color:red;">**must be terminated**</mark> with [semicolon (;)](/web/js/grammar/token/punctuator/semicolon.md) :

* `let`, `const`, variable statement
* `import`, `export`, module declaration
* [expression](/web/js/grammar/statement/expr.md) statement
* `debugger`
* `continue`, `break`, `throw`
* [return](/web/js/grammar/statement/flow/jump/return.md)
  {% endhint %}

{% tabs %}
{% tab title="⭐️ 重點" %}
{% hint style="success" %}
these statements are affected by [automatic semicolon insertion](/web/js/grammar/token/punctuator/semicolon/automatic-semicolon-insertion.md) (<mark style="color:yellow;">**ASI**</mark>).
{% endhint %}
{% endtab %}

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

* [return](/web/js/grammar/statement/flow/jump/return.md) is affected by <mark style="color:purple;">**automatic semicolon insertion**</mark>.
  {% endtab %}

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

* [ ] lexical grammar ⟩ [automatic semicolon insertion](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar#automatic_semicolon_insertion)
  {% endtab %}
  {% endtabs %}
