One, variable
1. Variable name: A combination of letters, numbers, underscores, and dollar signs that cannot begin with a number. is case sensitive.
2, declaring variables: var variable name = variable value;
Second, operator
1, arithmetic operators: +-*/(non-divisible)% (modulo) + +--+ = =
III. Basic data types
1. Basic data type: Number , string , boolean, undefined, null
undefined: non-existent variable
null: No value or null value
====================
2. typeof returns a string of data type
3, the value of the special values:
- Infinity 1e309
- -infinity 5e-324
typeof Infinity ==> "number"
Infinity-infinity ==>nan: (not digital)
- Infinity The result of arithmetic running with any other operand is also equal to infinity
Infinity+20 ==>infinity
- nan Special number : Nan is contagious, there is a nan in arithmetic operation, the whole result is Nan
typeof NaN ==> "number"
1+2+nan==>nan
Note 003: Basic data types, operators, control statements