# function\*

[JS](../../..) ⟩ [concepts](../../../concept) ⟩ [expression](../../../grammar/statement/expr) ⟩ function\* expression

{% hint style="success" %}
an [expr](../../../grammar/statement/expr "mention") that evaluate to a [](<> "mention") as [val](../../../val "mention").
{% endhint %}

{% tabs %}
{% tab title="💈範例" %}
👉 compare： [expr](../../../val/func/expr "mention")

```javascript
// ⭐️ 1. as "variable"
//
//           ╭───── 🔸 function* expression ─────╮
   const f = function*() { yield 'a'; yield 'b'; };
// ╰────────────── const expression ──────────────╯
```
{% endtab %}

{% tab title="📘 手冊" %}
* [function\* expression](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/function*)
{% endtab %}
{% endtabs %}
