1 / 20

What is the output of the generator function below after two calls? function* generator(i) { yield i; yield i * 2; } const gen = generator(10); console.log(gen.next().value); console.log(gen.next().value);

?

10, 20

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy