xPos = 10;
var xPos = 10;
var xPos = 10; // some time later ... xPos = 20;
- Variable names can begin with letters, or the symbols $ or _. They can only contain letters, numbers, $ and _. They cannot begin with a number. "myVariable", "leaf_1", and "$money3" are all examples of valid variable names.
- Variable names are case sensitive, which means that "xPos" is different from "xpos", so make sure you are consistent.
- Variable names can't be the same as existing variable names, and there are a lot in our ProcessingJS programming environment. If you ever see an error pop up like "Read only!", try changing your variable name.
- Variable names should be clear and meaningful; for example, instead of "ts", use "toothSize".
- Variable names should use camel case for multiple words, like "toothSize" instead of "toothsize" or "tooth_size".