class Rectangle {
constructor(width, height) {
this.width = width;
this.height = height;
}
get area() {
return this.width * this.height;
}
}
const rectangle = new Rectangle(5, 10);
console.log(rectangle.area());
Ответ: TypeError: rectangle, area is not a function at line 13
JavaScript test | #JavaScript & Max