【Javascript高级知识】深入理解原型链之继承的多种实现方式和优缺点

Javascript 之继承的多种实现方式和优缺点 1、 原型链继承 function Parent() { this.name = 'zhangsan'; this.children = ['A', 'B', 'C']; } Parent.prototype.getName = function() { console.log(this.nam
相关文章
相关标签/搜索