1
0
mirror of https://github.com/ruanyf/es6tutorial.git synced 2025-05-25 19:22:21 +00:00

Merge pull request #814 from byog/patch-2

Update generator.md
This commit is contained in:
Ruan YiFeng 2019-02-19 14:17:05 +08:00 committed by GitHub
commit 1a4ab0ea86
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -310,7 +310,7 @@ wrapped().next('hello!')
## for...of 循环
`for...of`循环可以自动遍历 Generator 函数时生成的`Iterator`对象,且此时不再需要调用`next`方法。
`for...of`循环可以自动遍历 Generator 函数运行时生成的`Iterator`对象,且此时不再需要调用`next`方法。
```javascript
function* foo() {