var Person = {
  age:18,
  name:"张三",
  get getAge(){
    return this.age;
  },
  get getName(){
      return this.name;
  },
  set setAge(age){
      this.age = age;
  },
  set setName(name){
      this.name = name;
  },
  eat:function(){
      console.log("吃饭");
  }
}
posted on 2021-04-26 20:53  文种玉  阅读(318)  评论(0编辑  收藏  举报