> 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/val/func/create.md).

# creating functions

[JS](/web/js.md) ⟩ [value](/web/js/val.md) ⟩ [function](/web/js/val/func.md) ⟩ create

{% hint style="success" %}
create [function](/web/js/val/func.md)s using [function declaration](/web/js/val/func/declare.md) / [function expression](/web/js/val/func/expr.md) / [Function](/web/js/val/builtin/func.md).
{% endhint %}

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

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