📘yield*
the "done" value of the iterator
Last updated
Was this helpful?
the "done" value of the iterator
Last updated
Was this helpful?
Was this helpful?
JS ⟩ objects ⟩ built-in ⟩ Generator ⟩ generator function ⟩ yield* expression
the value of yield* expression is the "done" value of the iterator. (undefined by default)
replit:value of yield* expression
const { log } = console;
// generator: a()
function* a() {
yield* [1, 2, 3];
return 'foo'; // ⭐️ "done" value of `a`
}