Please enable JavaScript to use CodeHS

CodeHS Glossary

Programming Style General

The way your code is written is the style. It covers the aspects of the code that goes beyond whether or not it just works. There are several aspects to programming style, which you can read more about on their specific pages. - [Indentation][1] - [Decomposition][2] - Making your [program read like a story][3] - Using naming conventions like [`lowerCamelCase`][4] - Not using [Magic Numbers][5] - Using [Constants][6] when appropriate - Not using [Nested Functions][7] - Writing [Comments][8] ---------- On CodeHS, your program is graded not only on whether or not the program works, but also based on its style. Programs are not just meant for computers to run but for humans to read. This means that it is really important to communicate well and use good programming style. Having a program that works but has bad style will receive the grading status of Functionality Approved. This means that your code works, but you need to improve your style before you can pass. [1]: [2]: [3]: [4]: [5]: [6]: [7]: [8]: