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/Merry-Lane Mar 22 '26
Lemme copy-paste Wikipedia for you:
Tl;dr:
OOP’s paradigm’s in a specific implementation is vague and debatable.
In OOP you can hear "object oriented programming". Are typescript types and interfaces used to define objects that encapsulate data and functions? Yes. Thus typescript types and interfaces are enough to do a certain form of OOP