📘function*

JSconceptsexpression ⟩ function* expression

an expression that evaluate to a generator function as value.

👉 compare: function expression

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

Last updated