欢迎光临散文网 会员登陆 & 注册

马老师抽丝剥茧设计模式

2022-10-22 22:39 作者:呵呵呵呵呵sp  | 我要投稿

class Dog {  kind = 'dog';  constructor(name) {    this.name = name;    this.legsNum = 4;  }  run() {    console.log("I am running with " + this.legsNum + " legs.")  }  say() {    console.log("Wang Wang, I am " + this.name);  }}const dog = new Dog('ming');dog.say();

马老师抽丝剥茧设计模式的评论 (共 条)

分享到微博请遵守国家法律