Naming things when coding can be challenging when you have different naming conventions available (set of rules used for naming entities). These conventions are essential for code readability and maintainability.
In this article, I will explain the differences between the most widely used case types in programming.
When choosing a case style, keep in mind the best practices of the programming language you are using in your project and it is also very important to be consistent.
Camel Case
Start with the first word lowercase, then capitalize the first letter of each word that follows.
e.g. firstName
Pascal Case
Start with the first word letter uppercase, then capitalize the first letter of each word that follows.
e.g. FirstName
Note: Pascal Case is usually used for naming classes
Snake Case
Separate each word with an underscore character (_)
e.g. first_name
Kebab Case
Separate each word with a dash character (-)
e.g. first-name
Commonly used for URLs or CSS class names
Conclusion

If you liked this article, then please subscribe to my YouTube Channel for Test Automation video tutorials. You can also find me on LinkedIn and Twitter.