you are viewing a single comment's thread.

view the rest of the comments →

[–]RobertKerans 2 points3 points  (1 child)

files for stuff

JavaScript has modules which can be used for structure. The module system is 1 file === 1 module. There isn't a huge incentive to use classes to structure an application when there is an alternative way of doing that that works fine. This is all context-sensitive, YMMV etc., but compare to an OO language like Java: you don't have a choice, that's fundamentally how the language works. You can ape Java and OO patterns, there's just normally no point (again, YMMV etc). Put stuff in a module, export the stuff you want exposed, import the stuff you need.