Good code is easy to read, understand, and maintain. As a programmer, I can’t always expect my codes will run smoothly and will be understood by anyone who attempts to change it.

So here’s an eight-step plan that I always follow to make my scripts easier for the maintainer.

  1. Keep Your Syntax and Structure Clean and Logical

  2. Use clear variable and function names

  3. Comment your code

  4. Keep your scripts self-contained

  5. Keep maintained variables separate and test dependencies

  6. Separate and communicate the visuals

  7. Separate textual content and code

  8. Document your code

#javascript

My Super Simple Developer’s Guide to Writing Clean and Readable Code
1.05 GEEK