# return value

[JS](https://lochiwei.gitbook.io/web/js) ⟩ [browser](https://lochiwei.gitbook.io/web/browser) ⟩ [event](https://lochiwei.gitbook.io/web/browser/event) ⟩ [handler](https://lochiwei.gitbook.io/web/browser/event/handler) ⟩ return value

{% hint style="success" %}

* in modern JavaScript, event handlers <mark style="color:yellow;">**should**</mark>**&#x20;**<mark style="color:red;">**not**</mark>**&#x20;**<mark style="color:yellow;">**return anything**</mark>.&#x20;
* in <mark style="color:yellow;">**older code**</mark>, returning <mark style="color:red;">**false**</mark> means "[**cancel default actions**](https://lochiwei.gitbook.io/web/browser/event/default-action/hide-or-not-to-hide)".
  {% endhint %}

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

* the <mark style="color:yellow;">**return value**</mark> of an <mark style="color:yellow;">**event handler**</mark> is related to [hide-or-not-to-hide](https://lochiwei.gitbook.io/web/browser/event/default-action/hide-or-not-to-hide "mention").
  {% endtab %}
  {% endtabs %}
