r/learnjavascript • • 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

117 comments sorted by

View all comments

Show parent comment

4

u/Ok-Area3665 Mar 21 '26

This, I've always hated the argument that it's syntactic sugar because how is that a negative? There's a reason we add and use syntactic sugar to languages.

2

u/Far_Broccoli_8468 Mar 22 '26

Fully agree.

Kotlin is basically java with loads of syntactic suger, but it makes it so much nicer to write code with.