Variables
Variables
8.) 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.
Answer: Naming conventions of variables are really important because while naming
conventions provide us a set of rules for choosing a sequence of characters to identify
variables. It helps us improve the clarity of the code and it looks more systematic.
Five best practices that you should follow:
There shouldn’t be any black space used in a variable.
The first character of a variable must be a letter or underscore.
Variables may not begin with a digit.
The max length of a variable should be up to 31 characters.
Both uppercase and lowercase letters can be used for naming variables.