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.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I recall it goes
but the key point to the statement is it can be reversed, hence
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.