I. Expressions
1. The JS interpreter can calculate it to generate a value;
2. The simplest expression is the direct amount or variable name. The value of the direct amount expression is the direct amount;
123; "I am a string" I + 1.7; (a + 3) * sum;
Ii. Operators
1. Most operators are symbols, such as "+" and "-", but some operators are represented by keywords, such as "delete ";
The P column indicates the priority of each operator. The value of a number is greater than that of a small number.
Iii. Equal operators = and equal operators =
1. = is allowed type conversion, === must be completely equal
2. = rules:
A. If the two values have different types, they are different;
B. If the two values are of the numeric type, they are equivalent if they are not Nan.
C. It is equivalent
D. If the two values point to the same reference, they are equivalent
E. If both are null or undefined, they are equivalent
3 .! = And! = Is the opposite rule
IV. In Operator
1. The number of operations on the left is a string, or can be converted to a string. The number of operations on the right is an object or array;
2. If the left value is an attribute name of the right object, true is returned;
VaR point = {X: 1, Y: 1}; var has_x_coord = "X" in point; // truevar has_y_coord = "Y" in point; // truevar has_z_coord = "Z" in point; // falsevar Ts = "tostring" in point; // true
V. instanceof
Returns true if the object on the left is an instance of the right class.
6. String Operators
1. <<=>= the Unicode used to determine the sequence
2. + the priority of string operators is higher than that of numbers
1 + 2; // 3 "1" + 2; /// 1211 <3; // false "11" <3; // true1 + 2 + "ABC "; // 3abc "ABC" + 1 + 2; // abc12