4
Co to jest słowo kluczowe „get” przed funkcją w klasie?
Co getoznacza w tej klasie ES6? Jak mam odwołać się do tej funkcji? Jak mam tego używać? class Polygon { constructor(height, width) { this.height = height; this.width = width; } get area() { return this.calcArea() } calcArea() { return this.height * this.width; } }
106
javascript
methods
getter