Share via


Invalid character (JavaScript)

You composed an identifier using a character (or characters) not recognized as valid by the JavaScript compiler. Valid characters use the following rules:

  • The first character must be an ASCII letter (either uppercase or lowercase) or an underscore (_).

  • Subsequent characters can be ASCII letters, numbers, or underscores.

  • The identifier name cannot be a reserved word.

To correct this error

  • Avoid using characters that are not part of the JavaScript language definition.

See also

Variables
Special Characters
Data Types