Understanding how variable declaration is done and its scope is very important.
You can declare a variable by using the
var keyword followed by the name of the variable. There are two syntaxes to declare a variable: one is to declare variables at class level, and another one is to declare local variables in blocks of instructions (inside functions, for example).
The following is the syntax you can use to declare a variable at the class level:
[public|private] [static] var varName [: varType] [= someValue];
Note that if you don't specify
private, all members will be private unless the class implements the
Static variables are variables that will be stored ...