把this.变成@

class Rectangle {
  height = 0;
  width;
  constructor(h,w) {    
    this.height = h;
    this.width = w;
  }
}
let p= new Rectangle(33,22);
console.log(typeof Rectangle);
console.log(p.width);

posted @ 2020-09-10 23:25  zjh6  阅读(12)  评论(0)    收藏  举报  来源