r/learnjavascript • u/pptzz • Mar 19 '26
What's the use of classes in JS
I've recently started learning JS and I can't see a use for classes. I get how they work and how to use them but I can't see an actual real use for them.
40
Upvotes
View all comments
Show parent comment
1
u/Far_Broccoli_8468 Mar 22 '26 edited Mar 22 '26
It's rich that you're saying i suffer from Dunning Kruger in another comment, because that's nothing more than a projection of yourself, as you are so thoroughly uneducated about any of this
OOP paradigm predates javascript by a whopping 30-40 years. People wanted javascript to have classes, and that's why classes were introduced into javascript
Typescript is literally just javascript with compile-time type saftey. Typescript compiles into javascript. There is nothing typescript can do that javascript can't do. The invention of the language itself did not make classes obsolete, quite the contrary.
That's absolute nonsense and you have no clue what goes on in the industry. Code is overwhelmingly developed with the OOP paradigm.
Angular is basically fully OOP. React has a special syntax but it is built on the concepts of OOP. Mixins are basically OOP inheritance