Constants and variables

Constants and variables should have a descriptive name. They should begin with a lowercase letter and be in CamelCase. The only exception is when the constant is global; in that case, the name of the constant should contain all uppercase characters with the words separated by underscores. I have seen numerous guides that frown upon having all uppercase names, but I personally like them for constants in the global scope because it stands out that they are globally, not locally, scoped. Here are some examples of proper and non-proper names:

//Proper Names 
playerName driveSize //Non-Proper Names PlayerName //Starts with uppercase letter drive_size //Has underscore in name
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset