What does the following code produce? function* gen() { yield 1; yield 2; return 3; } const g = gen(); console.log([…g]); JavaScript DeveloperMedium Try Now