> 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/iteration/generator/examples.md).

# generator examples

[JS](/web/js.md)⟩ [iteration](/web/js/iteration.md) ⟩ custom generators

{% tabs %}
{% tab title="💈範例" %}

* [\*list()](/web/js/iteration/generator/examples/list.md) - <mark style="color:yellow;">**finite**</mark> arithmetic sequence.
* [\*integers()](/web/js/iteration/generator/examples/integers.md) - <mark style="color:red;">**infinite**</mark> non-negative integers: 0, 1, 2, 3 ...
* [\*fibonacci()](/web/js/iteration/generator/examples/fibonacci.md) - <mark style="color:red;">**infinite**</mark>/<mark style="color:yellow;">**finite**</mark> fibonacci numbers: 1, 1, 2, 3, 5, 8 ...
* [\*sequence()](/web/js/iteration/generator/examples/seq.md) - yield values <mark style="color:yellow;">**sequentially**</mark>.
* [\*interleave()](/web/js/iteration/generator/examples/interleave.md) - <mark style="color:yellow;">**interleave**</mark> the values of [iterable](/web/js/iteration/iterable.md)s.
* [\*zip()](/web/js/iteration/generator/examples/zip.md) - <mark style="color:yellow;">**zip**</mark> [iterable](/web/js/iteration/iterable.md)s into a single [generator function](/web/js/iteration/generator/func.md).
  {% endtab %}

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

* [Broken mention](broken://pages/wdsR1aBto2o3YMiF3HsH)s are [iterable iterator](/web/js/iteration/iterator/iterable.md)s.
  {% endtab %}
  {% endtabs %}
