Open this example in the interactive library
Source code
function* combine() {
yield* [1, 2];
yield* [3, 4];
}
console.log([...combine()]);
Sample output
[ 1, 2, 3, 4 ]

Open this example in the interactive library
function* combine() {
yield* [1, 2];
yield* [3, 4];
}
console.log([...combine()]);
[ 1, 2, 3, 4 ]