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

2.1.2 Whitespace, Line Breaks, and Format Control Characters

JavaScript ignores spaces that appear between tokens in programs. For the most part
JavaScript also ignores line breaks (but see §2.5 for an exception). Because you can use
spaces and newlines freely in your programs, you can format and indent your program
in a neat and consistent way that makes the code easy to read and understand.
In addition to the regular space character (\u0020), JavaScript also recognizes the fol
lowing characters as whitespace: tab (\u0009), vertical tab (\u000B), form feed
(\u000C), nonbreaking space (\u00A0), byte order mark (\uFEFF), and any character in
Unicode category Zs. JavaScript recognizes the following characters as line terminators
line feed (\u000A), carriage return (\u000D), line separator (\u2028), and paragraph sep
arator (\u2029). A carriage return, line feed sequence is treated as a single line
Unicode format control characters (category Cf), such as RIGHT-TO-LEFT MARK
(\u200F) and LEFT-TO-RIGHT MARK (\u200E), control the visual presentation of the
text they occur in. They are important for the proper display of some non-English
languages and are allowed in JavaScript comments, string literals, and regular expres
sion literals, but not in the identifiers (e.g., variable names) of a JavaScript program
As a special case, ZERO WIDTH JOINER (\u200D) and ZERO WIDTH NON-JOINER
(\u200C) are allowed in identifiers, but not as the first character. As noted above, the
byte order mark format control character (\uFEFF) is treated as a space character.
友情链接It题库(| 版权归yishouce.com所有| 友链等可联系|粤ICP备16001685号-1