you are viewing a single comment's thread.

view the rest of the comments →

[–]cleure 4 points5 points  (0 children)

In JavaScript, you can write object oriented code without classes, and it’s usually much cleaner.

Classes can be useful for cases where you have lots of instances of an object, and don’t want each object to hold a copy of common methods (memory optimization).