Update generator.md

This commit is contained in:
SudoKillMe
2016-07-11 12:56:59 +08:00
committed by GitHub
parent c73b7b6f69
commit 262dd03113
+1 -1
View File
@@ -309,7 +309,7 @@ genObj.next('b')
## for...of循环
`for...of`循环可以自动遍历Generator函数,且此时不再需要调用`next`方法。
`for...of`循环可以自动遍历调用Generator函数时生成的Iterator对象,且此时不再需要调用`next`方法。
```javascript
function *foo() {