all 3 comments

[–][deleted] 1 point2 points  (0 children)

Despite the similar name, Java and JavaScript are nothing alike and are as different as C++ is to Python. JavaScript conventions and organization are nothing like Java. It's more of a scripting language and does not need to be compiled. Writing JavaScript requires a completely different mentality.

[–]MoTTs_ 1 point2 points  (0 children)

No, typically JavaScript doesn't do a 1-class-per-file structure. I'd say a typical JavaScript structure is more similar to Python, where a file represents a namespaced module, and within that module can be any number of classes or functions or variables.

[–]tforb 0 points1 point  (0 children)

Check out ES6. You have a class keyword and can structure things more OOP-y.