As a newcomer to JavaScript, I've been experimenting with the language to enhance my understanding. One aspect that puzzles me is how developers organize large JavaScript programs. In languages like Java, breaking down code into smaller files is common practice. However, it seems this isn't the case in JavaScript. Is everything usually contained within one massive file? It just doesn't seem right to me.
For instance, my ideal setup would consist of separate files—one for helper functions and another for problem-specific functions—where I could utilize the helper functions in my problem-oriented file.
If keeping things in one giant file is customary, should I divide it using modules? Apologies for the lengthy post, but I'm truly perplexed and struggling to articulate my confusion accurately.