题解 | #Getter#
Getter
https://www.nowcoder.com/practice/e7f3a2f429d945e49f5b48ef1065beda
class Rectangle {
// 补全代码
constructor(h,w){
this.height=h;
this.width=w;
}
get area(){
return this.height*this.width
}
}

