4. What are your opinions on naming convention of variables declared in programming? Write down five best practices that you think one should follow while declaring variables.
Answers
Explanation:
Class names should be nouns in UpperCamelCase , with the first letter of every word capitalised. Use whole words – avoid acronyms and abbreviations (unless the abbreviation is much more widely used than the long form, such as URL or HTML).
A variable's name can be any legal identifier — an unlimited-length sequence of Unicode letters and digits, beginning with a letter, the dollar sign " $ ", or the underscore character " _ ". The convention, however, is to always begin your variable names with a letter, not " $ " or " _ ".
Naming conventions are important to the ensure clear and consistent code. A naming convention should be simple and easy to remember and use. Properly designed naming conventions make code easier to read without imposing undue burdens on developers.