JS的继承

拖了很久的JS继承终于来个总结了T^T 本篇文章参考阮一峰老师的博文。一共有三篇。 一、先说一下prototype对象 function Cat(name, age){ this.name = name; this.age = age; this.speak = function () { console.log(this.name + ' miao');
相关文章
相关标签/搜索