function* inner() {
yield 1;
yield 2;
return 10;
}
function* outer() {
const result = yield* inner();
yield result;
yield 3;
}
const gen = outer();
const a = gen.next().value;
const b = gen.next().value;
const c = gen.next().value;
const d = gen.next().value;
console.log(a, b, c, d); Post #3397
2.46K
CHALLENGE
- 🔥 1