题解 | JS26 Getter
class Rectangle {
// 补全代码
constructor(height,width){
this.height = height,
this.width = width
}
get area(){
return this.height * this.width;
}
}