理解ES6 Generator 函数 - 简书
2016年9月9日 - Generator.prototype.throw() Generator函数返回的遍历器对象,都有一个throw方法,可以在函数体外抛出错误,然后在Generator函数体内捕获。 既然我的文...
Generator 函数学习笔记 - Tirion - 博客园
2016年11月1日 - throw() // b g.next() // c Generator.prototype.return() Generator函数返回的遍历器对象,还有一个return方法,可以返回给定的值,并且终结遍历Genera...
深入理解js generator数据类型
2016年8月23日 - 2.5 Generator.prototype.throw() thorw()方法, 通过抛出一个异常到迭代器中,来重新获得迭代器的执行; 返回 带有 value和done两个属性的object对象 fu...