编辑代码

//JSRUN引擎2.0,支持多达30种语言在线运行,全仿真在线交互输入输出。 
function* gun1(){
    yield 1;
    yield* [2,3,4],
    yield 5;
    yield 6;
}
let iterator = gun1();
for(item of iterator){
    console.log(item)
}