Without get the property holds a function rather than its result.
Acceptance criteria
- 1.#out should show 20.
Without get the property holds a function rather than its result.
class Rectangle { constructor(width, height) { this.width = width; this.height = height; } area() { return this.width * this.height; } } const value = new Rectangle(4, 5).area; document.querySelector('#out').textContent = typeof value === "function" ? "still a function" : String(value);
Output ready when you are
Press Run to render your code, or Submit to validate your solution.