Best Practices - Frisbie, Matt (Professional JavaScript for Web Developers, 2019)
Best practices for JavaScript fall into several categories and are handled at different points in the development process. Writing maintainable code is important because most developers spend a large amount of their time maintaining other developers' code. One of the simplest ways to start writing maintainable code is to come up with code conventions for the JavaScript that one writes. Professional organizations have long instituted code conventions for developers in an attempt to make code more maintainable for everyone. This chapter discusses the basics of how to develop code conventions. As with other languages, part of the performance equation has to do with the algorithm or approach used to solve the problem. Skilled developers know from experience which approaches are likely to achieve better performance results. The number of statements in JavaScript code affects the speed with which the operations are performed.