1function* fnc() {
2 console.log('开始')
3 const a = yield '返回给next' // next 没有传参 a 默认 undefined
4 console.log(a, '结束') // next传入 '结束'
5 return '2'
6}
7const f = fnc()
8f.next('next传入') // {value: "返回给 next", done: false}
9f.next() // {value: undefined, done: true}