mirror of
https://github.com/ruanyf/es6tutorial.git
synced 2024-04-21 12:32:22 +00:00
edit docs/generator
This commit is contained in:
+1
-1
@@ -221,7 +221,7 @@ for(let value of delegatingIterator) {
|
||||
|
||||
上面代码中,delegatingIterator是代理者,delegatedIterator是被代理者。由于`yield* delegatedIterator`语句得到的值,是一个遍历器,所以要用星号表示。
|
||||
|
||||
下面是一个稍微复杂的例子,使用yield*语句遍历二叉树。
|
||||
下面是一个稍微复杂的例子,使用yield*语句遍历完全二叉树。
|
||||
|
||||
```javascript
|
||||
|
||||
|
||||
Reference in New Issue
Block a user