Variables
Last updated
Was this helpful?
Last updated
Was this helpful?
You will use camelCase for names of functions and variables, which means no underscores, and every word but the first is capitalized.
BAD:
GOOD:
Names should be descriptive, and explain their purpose.
Names should also ALWAYS be nouns, never verbs, never adjectives. If you feel the need to have it's name be a verb, consider a instead.
BAD:
GOOD:
When variables are inside of a class, they should be marked private
if possible. Use getters and setters to access the variable publicly.