Summary
In this chapter, we discussed a few concepts of structuring JavaScript-based projects and splitting them into modules to increase the scalability and maintainability. We also saw how effectively we can use the mediator pattern to provide communication between modules. Documentation also plays an important role and increases the maintainability, and we used JSDoc3, which is one of the most popular JavaScript documentation APIs and helped developers to reference and understand the functions of JavaScript during development. Lastly, we discussed how to optimize the load time of your application by compressing and merging your JavaScript files into one minified JavaScript file to increase the performance. In the next chapter, we will discuss testing and debugging JavaScript applications and the tools that are available to troubleshoot efficiently.