generator函数学习笔记
摘要:一、基本概念Generator函数是一种可以暂停执行,返回iterator对象的函数,yield是暂停标识function* gen(){ yield 1; yield 2;}Generator函数在function后面有一个*,内部有yield语句function* gen(){ ...
阅读全文
posted @ 2015-12-16 20:40
posted @ 2015-12-16 20:40
posted @ 2015-11-11 13:22
posted @ 2015-08-30 18:43
posted @ 2015-08-26 20:02
posted @ 2015-08-25 13:18