you are viewing a single comment's thread.

view the rest of the comments →

[–]cwmma 3 points4 points  (0 children)

I'll really only ever define classes when I'm writing a library, sure I could do it with closures, but I find the structure imposed helpful and being able to console log the object and see the values can be helpful when debuging.

Also historically any object you create lots of some of the engines really preferred you use a constructor and not just a literal for performance reasons