ducky_L

导航

js 如何实现类

一、使用原型 function Chicken1(name) { this.name = name } Chicken1.prototype.kind = 'chicken'; Chicken1.prototype.say = function () { console.log(`hello,i'm

posted on 2023-04-24 17:44  ducky_L  阅读(23)  评论(0编辑  收藏  举报