# creating functions

[JS](https://lochiwei.gitbook.io/web/js) ⟩ [value](https://lochiwei.gitbook.io/web/js/val) ⟩ [function](https://lochiwei.gitbook.io/web/js/val/func) ⟩ create

{% hint style="success" %}
create [](https://lochiwei.gitbook.io/web/js/val/func "mention")s using [declare](https://lochiwei.gitbook.io/web/js/val/func/declare "mention") / [expr](https://lochiwei.gitbook.io/web/js/val/func/expr "mention") / [func](https://lochiwei.gitbook.io/web/js/val/builtin/func "mention").
{% endhint %}

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

* [declare](https://lochiwei.gitbook.io/web/js/val/func/declare "mention")
* using [func](https://lochiwei.gitbook.io/web/js/val/builtin/func "mention") constructor
* [expr](https://lochiwei.gitbook.io/web/js/val/func/expr "mention") - an [expr](https://lochiwei.gitbook.io/web/js/grammar/statement/expr "mention") that evaluates to a <mark style="color:purple;">**function**</mark>.
  * [arrow](https://lochiwei.gitbook.io/web/js/val/func/arrow "mention")
  * [iife](https://lochiwei.gitbook.io/web/js/val/func/expr/iife "mention") - immediately invoked function expression
    {% endtab %}
    {% endtabs %}
