js 继承(一)之原型链、借用构造函数、组合继承

前言 … Just we 原型链 基本思想利用原型让一个引用类型继承另一个引用类型的属性和方法 function Father() { this.last_name = '张' } Father.prototype.sayLast_Name = function () { console.log('我的姓:' + this.last_name) } function Son() {
相关文章
相关标签/搜索