77.9k views
1 vote
Which of these is a good thing to consider when naming variables?

The name should be readable and make sense
Keep it short, less typing
Use only letters
O Sentences are Tood variable names.

1 Answer

6 votes

Answer:

The name should be readable and make sense

Step-by-step explanation:

Aside the rules involved in naming variables, there are also some good tips which should be considwred when given names to our variables. These means there are some variables which are acceptable by our program but may be avoided in other to make our codes easier to read by us and others and it also makes debugging easier when we run into errors. Using short variables are acceptable on code writing as far as the rules are followed. However, it is more advisable to use names that are descriptive and readable such that it relates to the program or code being worked on. This ensures that we and others can follow through our lines of code at a much later time without making mistakes or forgetting what the variable stands for.

User Thomas Crawford
by
6.2k points