Course · Section 14: Object-Oriented Programming (OOP) With JavaScript · Lecture 226: ES6 Classes
Define a `Rectangle` class with an `area()` method, and implement `rectangleArea(w, h)` that returns the area of a new rectangle.
+ 1 hidden test run on Submit.
A class encapsulates the dimensions and exposes area() that multiplies them.
Run your code to see results.