DEV Community

loading...

Discussion on: I Don't Use JavaScript Classes At All. Am I Missing Out on Something?

Collapse
andi23rosca profile image
Andi Rosca

Yeah true. In some ways objects can be considered better since they have more functionality attached to them, but in JS to me at least they’re pretty much the same thing.

I prefer closures since JS doesn’t have private properties on classes but you can choose not to return things from a closure and keep them private in a sense.