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

1

u/prehensilemullet Mar 19 '26

Whoever downvoted me, please get a clue before you cause problems for your coworkers.  Think of date classes or ORM instances which have dozens of methods.  You wouldn’t want these classes to be taking up way more space on a production server.

Don’t be a shitty developer.  Know the pros and cons of things and when to use them wisely.