复制1function* generator(i) { 2 yield i; 3 yield i * 2; 4} 5 6const gen = generator(10); 7 8console.log(gen.next().value); 9console.log(gen.next().value);
1function* generator(i) { 2 yield i; 3 yield i * 2; 4} 5 6const gen = generator(10); 7 8console.log(gen.next().value); 9console.log(gen.next().value);
本题为“单选题”
题库维护不易,您的支持就是我们最大的动力!