把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);

你可能感兴趣的:(笔记)