noahlam / articles

个人技术帖合集

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

JS中的继承两点建议

ShuBuShao opened this issue · comments

大佬的文章写的很棒. 读后很有收获.

有两点笔误指出一下:

  1. JS中的继承(下)中, 寄生组合式继承示例中, 使用inherit的地方, 应该是inherit(Student, Person)?
  2. JS中的继承(上)中, 演示原型链继承的示例代码中, 没有修改子类构造函数的指向, 否则子类实例的构造函数会指向父类
commented

已更正,感谢大佬指出。

感谢大佬