Primitive type value (Primitive values)
The following are all primitive type values (abbreviations: original values):
- Boolean type: True,false
- Number type: 1736,1.351
- String type: ' abc ','ABC '
- Two "no Value (non-values)": Undefined,null
Object (Objects)
All values other than the original value (non-primitive) are objects. Some of the most common types of objects are:
Simple objects (types are object) can be created by object literals:
{ ' Jane ', ' Doe '}
The above object has two properties: the value of the FirstName property is "Jane", and the value of the LastName property is "Doe".
An array (type is an array) can be created by an array literal:
[' Apple ', ' banana ', ' cherry ']
The above array has three elements that can be accessed through a numeric index. For example, the index of "Apple" is 0.
A regular Expression object (type RegExp) can be created with regular expression literals.
/^a+b+$/
BOOL (booleans)
The primitive values of the Boolean type include True and false. The following operator produces a Boolean value:
- Binary logical operator:&& (with), | | Or
- Prefix logical operator:! (non)
- Equivalent operator: = = = = = =!== = =
- comparison operator (string or number):> >= < <=
Undefined and null (undefined and null)
Note: http://www.cnblogs.com/yanhaijing/p/3685304.html#sect_conventions
Organize JavaScript basics