JavaScript identifier

Identifier

In JS All we can self-named can be called identifier. For example: variable names, function names, attribute names belong identifier.

Naming an identifier need to comply with the following rules:

1, identifier may contain letters, numbers, underscore _, $

2, the identifier can not begin with a number. With a letter, underscore _, $ beginning no problem

3, ES identifier can not be a keyword or reserved word;

 

 

 

 4, generally used hump identifier nomenclature. The first letter lowercase, beginning letter of each word capitalized, the rest lowercase.

 

 

 

 When the save flag Unicode encoding actually used only JS bottom, so in theory, all UTF-8 characters all contained are available.

Chinese can also be used, but it is best not to use.

 

Guess you like

Origin www.cnblogs.com/nyw1983/p/11490300.html