File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -499,7 +499,7 @@ A.__proto__ === Function.prototype // true
499
499
A .prototype .__proto__ === undefined // true
500
500
```
501
501
502
- 这种情况与第二种情况非常像。` A ` 也是一个普通函数,所以直接继承` Function.prototype ` 。但是,` A ` 调用后返回的对象不继承任何方法,所以它的` __proto__ ` 指向` Function.prototype ` ,即实质上执行了下面的代码。
502
+ 这种情况与第二种情况非常像。` A ` 也是一个普通函数,所以直接继承` Function.prototype ` 。但是,` A ` 调用后返回的对象不继承任何方法,所以它的` __proto__ ` 指向` undefined ` ,即实质上执行了下面的代码。
503
503
504
504
``` javascript
505
505
class C extends null {
Original file line number Diff line number Diff line change @@ -336,8 +336,8 @@ for (let v of foo()) {
336
336
function * fibonacci () {
337
337
let [prev, curr] = [0 , 1 ];
338
338
for (;;) {
339
- [prev, curr] = [curr, prev + curr];
340
339
yield curr;
340
+ [prev, curr] = [curr, prev + curr];
341
341
}
342
342
}
343
343
You can’t perform that action at this time.
0 commit comments