js高级知识—继承

原型链继承函数 // 定义一我的类 function Person (name) {   // 属性  this.name = name || 'Person'; // 实例方法   this.work = function(){     console.log(this.name +'专业编代码!');   } } // 原型方法 Person.prototype.play = function
相关文章
相关标签/搜索