1
0
mirror of https://github.com/ruanyf/es6tutorial.git synced 2025-05-27 20:32:21 +00:00

edit class

This commit is contained in:
Ruan Yifeng 2015-04-08 19:48:21 +08:00
parent f0fa42e239
commit 4f4d81a229

View File

@ -333,9 +333,9 @@ cp instanceof Point // true
在ES5中每一个对象都有`__proto__`属性指向对应的构造函数的prototype属性。Class作为构造函数的语法糖同时有prototype属性和`__proto__`属性,因此同时存在两条继承链。
- 子类的`__proto__`属性,表示构造函数的继承,总是指向父类。
1子类的`__proto__`属性,表示构造函数的继承,总是指向父类。
- 子类prototype属性的`__proto__`属性表示方法的继承总是指向父类的prototype属性。
2子类prototype属性的`__proto__`属性表示方法的继承总是指向父类的prototype属性。
```javascript