--- title: JavaScript Quality Guide --- ## Goal This style guide aims to provide the ground rules for an application's JavaScript code, such that it's highly readable and consistent across different developers on a team. The focus is put on quality and coherence across the different pieces of your application. ## Table of Contents 1. [Modules](#modules) 2. [Strict Mode](#strict-mode) 3. [Spacing](#spacing) 4. [Semicolons](#semicolons;) 5. [Linting](#linting) 6. [Strings](#strings) 7. [Variable Declaration](#variable-declaration) 8. [Conditionals](#conditionals) 9. [Equality](#equality) 10. [Ternary Operators](#ternary-operators) 11. [Functions](#functions) 12. [Prototypes](#prototypes) 13. [Object Literals](#object-literals) 14. [Array Literals](#array-literals) 15. [Regular Expressions](#regular-expressions) 16. [Comments](#comments) 17. [Variable Naming](#variable-naming) 18. [Everyday Tricks](#everyday-tricks) ## Modules The most common module systems are [CommonJS](https://wiki.commonjs.org/wiki/CommonJS), [AMD](https://requirejs.org/docs/whyamd.html), and [ES6 Modules](https://eviltrout.com/2014/05/03/getting-started-with-es6.html). Modules systems provide individual scoping, avoid leaks to the `global` object, and improve code base organization by **automating dependency graph generation**, instead of having to resort to manually creating multiple `