It is extremely important to
be aware that javascript makes a sharp distinction between capital and
lowercase letters.
Javascript does not consider a variable named myvalue to be the same as a variable named MYVALUE.
Consider these examples:
Javascript does not consider a variable named myvalue to be the same as a variable named MYVALUE.
Consider these examples:
|
The output of example 1 would be 10 (5+5).
The output of example 2 would be 7 (2+5).
The best advice is to use the same syntax on all variables.
Either write all variables in small letters, start with one capital letter or write all variables in capitals.
Which syntax you chose is not important
- as long as you chose just one!