JavaScript: The Definitive Guide, Sixth Editio javaScript权威指南(第6版) pdf 文字版-文字版, javascript电子书, 和javascript 有关的电子书:

2.4 Identifiers and Reserved Words

An identifier is simply a name. In JavaScript, identifiers are used to name variables and
functions and to provide labels for certain loops in JavaScript code. A JavaScript iden-
tifier must begin with a letter, an underscore (_), or a dollar sign ($). Subsequent char-
acters can be letters, digits, underscores, or dollar signs. (Digits are not allowed as the
first character so that JavaScript can easily distinguish identifiers from numbers.) These
are all legal identifiers:
i
my_variable_name
v13

_dummy
$str
For portability and ease of editing, it is common to use only ASCII letters and digits in
identifiers. Note, however, that JavaScript allows identifiers to contain letters and digits
from the entire Unicode character set. (Technically, the ECMAScript standard also
allows Unicode characters from the obscure categories Mn, Mc, and Pc to appear in
identifiers after the first character.) This allows programmers to use variable names
from non-English languages and also to use mathematical symbols:
var sí = true;
var π = 3.14;
Like any language, JavaScript reserves certain identifiers for use by the language itself.
These “reserved words” cannot be used as regular identifiers. They are listed below.

欢迎转载,转载请注明来自一手册:http://yishouce.com/book/1/27602.html
友情链接It题库(ittiku.com)| 版权归yishouce.com所有| 友链等可联系 admin#yishouce.com|粤ICP备16001685号-1