Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JS:有哪些继承方式 #15

Open
HCLacids opened this issue Feb 24, 2022 · 1 comment
Open

JS:有哪些继承方式 #15

HCLacids opened this issue Feb 24, 2022 · 1 comment
Labels

Comments

@HCLacids
Copy link
Owner

参考链接

之前只知道原型链继承、es6 class继承
里面提到了call的继承在使用Parent.call(this)
和实例继承,在函数中实例一个父对象,在返回他。
组合式继承,在函数调用父构造器、在原型链继承
寄生组合继承 利用一个空类形成继承方法

@HCLacids HCLacids added the JS label Feb 24, 2022
@HCLacids
Copy link
Owner Author

参考链接

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant