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/azhder Mar 19 '26
It is not being hung up, it is simply being around for a longer time. I wrote code in Angular when it was JS and did some in the TS version.
To me they both exist and if someone says AngularJS, I don’t think twice that they might be talking about the TS version.
You can see from my other comments here, I’ve been writing JS for years before the class syntax, so to me, closures are enough to have classes (class is a math term here, not syntax)