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

2.3 Literals

A literal is a data value that appears directly in a program. The following are all literals:
12               // The number twelve
1.2              // The number one point two
"hello world"    // A string of text
'Hi'             // Another string
true             // A Boolean value
false            // The other Boolean value
/javascript/gi   // A "regular expression" literal (for pattern matching)
null             // Absence of an object
Complete details on numeric and string literals appear in Chapter 3. Regular expression
literals are covered in Chapter 10. More complex expressions (see §4.2) can serve as
array and object literals. For example:
{ x:1, y:2 }    // An object initializer
[1,2,3,4,5]     // An array initializer
友情链接It题库(| 版权归yishouce.com所有| 友链等可联系|粤ICP备16001685号-1