Friday, 24 January 2014

3.1.1 Naming Variables

Variable

A variable can be as short as a single letter but cannot be a number.After the first character, a variable name can include letters, numbers and underscores in any combination
The name of a variable cannot be one of the words that the programming language has reserved.  E.g. print, if, while etc.

A good variable name is specific to the information being stored.  E.g. firstName

No comments:

Post a Comment