1. Use consistent indentation
There is no right or wrong indentation that everyone should follow. The best style, is a consistent style. Once you start competing in large projects you’ll immediately understand the importance of consistent code styling.
2. Follow the DRY Principle
DRY stands for “Don’t Repeat Yourself.
The same piece of code should not be repeated over and over again.
3. Avoid Deep Nesting
Too many levels of nesting can make code harder to read and follow.