Scripter Javascript Tutorial
javascriptmusiclogicscripterbookexcerpttutorial14 Allowed Characters
MDN: Grammar and types: Variables
Variables have a few rules when naming:
The variable name can only contain letters, numbers, the symbol “$” (dollar sign), and the symbol “
_
” (underscore).The first character cannot be a number.
Variable names are case sensitive.
The following are examples of valid variable names:
var activeNotes;
var beats_per_bar;
var note1;
var \$;
var ActiveNotes; // begins with a capital letter, so it's a new variable.
The following are examples of invalid variable names:
var 2nd_note;
var beats-per-bar; // hyphens aren't allowed