So you are a React developer or Node.js developer. You can write code that works. But can you write code that is visually beautiful and understandable by others?

Today we will see some rules to make your JavaScript code clean and clear.

  • Rule 1. Don’t Use Random Characters as Variable
  • Rule 2. Use camelCase Variable Name
  • Rule 3. Use Good camelCase Function Name
  • Rule 4. Use PascalCase For Constructor Function Naming
  • Rule 5. Global Constants
  • Rule 6. Assignment to Variable
  • Rule 7. Usage of Equality Operators
  • Rule 8. Usage of the Ternary Operator
  • Rule 8. Usage of the Ternary Operator
  • Rule 10. Use of If Statements
  • Rule 11. Usage of For Loop
  • Rule 12. Consistent Indentation Length
  • Rule 13. Line Length
  • Rule 14. Primitive Literals
  • Rule 15: Use of “undefined”

#javascript #web-development #programming #developer

15 Rules For Writing Clean JavaScript
2.15 GEEK