题解 | #Getter#
Getter
https://www.nowcoder.com/practice/e7f3a2f429d945e49f5b48ef1065beda
constructor(heigth, width) {
this.heigth = heigth
this.width = width
}
get area() {
return this.heigth * this.width
}