--

Classes is a fundemental to OOP. I would agree that it's a bit useless in Javascript, since JS Classes is actually syntactical sugar for the more traditional approach of creating 'classes' with functions in Javascript. You can't overload in JS classes, either, which I think is bit of a problem and something that JS just misses out on.

Instead you're basically forced to create a bunch of different classes of the same class just to cover all scenarios where you want to achieve different things based on arguments passed.

--

--

No responses yet