JS中多繼承的幾種實現方法

先了模擬一下new操做符的做用:javascript function Person(name){ this.name = name; } Person.prototype.say = function(){ console.log(this.name); } var p = new Person("KD"); p.say(); var obj = {} Object.setProtot
相關文章
相關標籤/搜索