E.g. with ``` function* numbers(x) { yield 1; yield 2; yield 3; yield x; } ``` For..of: ``` for (const x of numbers(99)) { console.log(x); } // => 1 // => 2 // => 3 // => 99 ``` Spread: ``` const arr = [...numbers(99)]; console.log(are); // => [1, 2, 3, 99] ```
E.g. with
For..of:
Spread: